Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Perl Idioms Explained - keys %{{map{$_=>1}@list}}by dragonchild (Archbishop) |
on Aug 04, 2003 at 14:06 UTC ( [id://280681]=note: print w/replies, xml ) | Need Help?? |
Along similar lines, I will often create a hash of keys which are needed for lookup. For example, I will do:
It's a nice way of working with a changing list of static acceptable things. ------ The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6 Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In Section
Meditations
|
|