Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: Use of single quotes versus double quotes

by Devanchya (Beadle)
on Dec 08, 2006 at 21:59 UTC ( #588718=note: print w/replies, xml ) Need Help??


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

If it helps at all, about 6 months ago I went into a perl refresher course everyone on the team had to take. One of the issue was that the people who really did not program in perl could not understand when to use ' versus ".

Of course 'text\n' will print out text\n on the screen when the programmer most likely meant to do just text with a new line. The argument came down to:

Do you want to explicity Expand by default, or not Expand by default.

It comes down to what you are programming, and for what use.

If what you are programming will be expanding varibles a lot, then use " and make your life easier. If you want to make sure not to expand varibles, etc, use ' by default.

My guess is, most programmers will go with " because it's lazyer and works 99% of the time.

Even smart people are dumb in most things...
  • Comment on Re^4: Use of single quotes versus double quotes

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2022-05-27 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (94 votes). Check out past polls.

    Notices?