in reply to Myth busted: Shell isn't always faster than Perl

It depends on what you're doing also. Once when I rewrote a third-party utility in perl, rewriting this bit caused it to go slower in perl:
grep "^function" *.4gl | sed "s/\(.*\):function \(.*\)(.*/\2 \1 \/^function \2(/"
But the above was wrong, so I rewrote a "correct" perl version :
/^\s*function\s+(\w+)\s*\(/i # and then use hashes to save data so there's no s///
I rewrote the new perl version in shell (grep/sed) for kicks, and it was slower than the perl version (and much uglier).