|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Re: Perl Idioms Explained - my ($foo, $bar) = @{shift(@_)}{qw/ -foo -bar /}by leriksen (Curate) |
| on Mar 02, 2004 at 00:55 UTC ( #333129=note: print w/ replies, xml ) | Need Help?? |
|
This may be more useful as a parser for simple command line arguments if you call it with {@ARGV} But there are lots of better ways to do that - this a very lightweight way.
I've recently (last 3-4 months or so) been using named parameter lists for almost all my library code and also using Params::Validate, so my idomatic (OO) code looks like Note: Chopper Reed is self confessed hitman and was sectioned as a self-mutilator whilst serving time in prison for murder. He has been released, is a successful media personality and author, and recently bought a brewery. He recently left his wife and farm in Tasmania because he "...didn't like the septic loo backing up." +++++++++++++++++
In Section
Meditations
|
|
||||||||||||||||||||||