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 reply to Re: Two simple code style advice questions
by jhourcle
in thread Two simple code style advice questions
by eyepopslikeamosquito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |