Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 exploiting the Monastery: (11)
As of 2015-07-31 07:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (275 votes), past polls