Your question is not only general it is too general. For example a regex can be fast but if you introduce lots of backtracking into it, it can be very slow.
There is a chapter in the official perl book ("Programming Perl" by Larry Wall...) on efficiency (page 537 in my edition), which might have some useful tips for you
I would suggest profiling your program. The "recommended by perlmonks" module of the moment seems to be Devel::NYTProf.
In reply to Re: Making my Perl program a bit faster
by jethro
in thread Making my Perl program a bit faster
by mrguy123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |