Don't ask to ask, just ask | |
PerlMonks |
Re: Two simple code style advice questionsby jhourcle (Prior) |
on Jan 16, 2013 at 15:54 UTC ( [id://1013596]=note: print w/replies, xml ) | Need Help?? |
This is probably an over optimization, but for really long lists, I use: my %ntests = map { $_ => undef } @tests;And then test using exists. It reduces the memory footprint slightly (or at least, it used to ... I admit I haven't verified that it's still true in more recent versions of perl.)
In Section
Seekers of Perl Wisdom
|
|