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

RE: RE: Subtle Quirks

by merlyn (Sage)
on Jul 28, 2000 at 19:33 UTC ( #24881=note: print w/replies, xml ) Need Help??


in reply to RE: Subtle Quirks
in thread Subtle Quirks

That's why I would probably not write this:
my %foo = (BAR => $cgi->param('bar'), BAZ => $cgi->param('baz'), ZOT => $cgi->param('zot'), );
But rather this:
my %foo; $foo{$_} = param($_) for qw(bar baz zot);
It's more compact and maintainable.

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://24881]
help
Chatterbox?
[Happy-the-monk]: Good morning! "You have 666 points until level ..." - alright then, prepare for the worst.

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2017-12-18 10:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (476 votes). Check out past polls.

    Notices?