CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [s660117] Using \? in a variable: Edit Log



MDTech.us_MAN
Novice

Oct 13, 2012, 8:25 PM


Views: 6234
Re: [s660117] Using \? in a variable


In Reply To
...

The first thing I discovered is that it is impossible to code
if ($input eq "?") {$input = "\$input";}
presumably because the leading backslash is interpreted as an attempt to create a reference to $input.

...




Use:

Code
if ($input eq '?') {$input = '\$input';}


When you use ' I don't think variables get parsed at all.

Maxwell.

Owner and Webmaster of http://MDTech.us


(This post was edited by MDTech.us_MAN on Oct 13, 2012, 8:27 PM)


Edit Log:
Post edited by MDTech.us_MAN (Novice) on Oct 13, 2012, 8:27 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives