Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Use of single quotes versus double quotes

by imp (Priest)
on Dec 08, 2006 at 19:44 UTC ( #588680=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Use of single quotes versus double quotes
in thread Use of single quotes versus double quotes

There is no runtime difference unless there is a variable being interpolated, in which case only double quotes are appropriate. The perl parser treats them the same otherwise:

perl -MO=Deparse -e ' $a = "foo"; $b = ''foo''; $c = q{foo}' $a = 'foo'; $b = 'foo'; $c = 'foo';
perl -MO=Deparse -e ' $a = "$foo"; $b = q{$foo};' $a = "$foo"; $b = '$foo';


Comment on Re^3: Use of single quotes versus double quotes
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://588680]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2014-11-26 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (170 votes), past polls