Two things (so far).
Slurping a file and regexing out what you want is faster than reading the file line by line in a while loop (in my experience).
Hash slices are faster than separate lookups (ditto).
My general rule for speed is to try to do as much as you can in the perl interpreter, as opposed to the perl language. See Re: converting binary to decimal as an example.
Try to do operations on groups of things, not the individual elements.
Recheck the RosettaCode page :)
In reply to Re: Perl at Rosetta Code, with one particular example
by tybalt89
in thread Perl at Rosetta Code, with one particular example
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |