Write it as mostly a single regular expression. You are using a number of very un-perl-like things. The fact that you have to set $" should be the first clue.
Writing it as a single regular expression will almost certainly speed it up as well. You're making Perl do all the things it hates doing. I know, I've had many chats with Perl. {grin}
-- Randal L. Schwartz, Perl hacker
In reply to Re: Optimization for readability and speed (code)
by merlyn
in thread Optimization for readability and speed (code)
by deprecated
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |