Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: why qw() rather than ()

by mwp (Hermit)
on Jan 22, 2001 at 18:32 UTC ( [id://53492]=note: print w/replies, xml ) Need Help??


in reply to why qw() rather than ()

use vars qw(@array %hash $scalar); Is actually equivalent to: use vars ('@array', '%hash', '$scalar');

qw() is great for defining lists, especially of single-word strings, because you don't have to quote and comma delimit the list. It's usefulness becomes even more apparent when you have rather complicated code and if you can reduce punctuation you'll save on aspirin bills.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-18 07:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found