in reply to Optimizing Perl?

use Disclaimer qw(optimization is probably a waste of your time);
If you're looking at the same string over and over again you could use the study() function to optimise the regex searches.
Make sure you're using the right tool for the right job i.e use index() instead of regex if you're just checking for sub strings within strings.
Try avoid using saw-ampersand ($&) as it can slow down the execution of your code.
HTH

broquaint

Replies are listed 'Best First'.
Re: Re: Optimizing Perl?
by erikharrison (Deacon) on Apr 19, 2002 at 16:10 UTC

    As I recall, $& no longer causes the slowdown it used to, and now only it's brother and sister had that problem.

    Cheers,
    Erik