# ./show_me_the_problem.sh **************************** here are the two programs: -rwxr-xr-x 1 root root 177 wrz 30 17:57 run_fast.pl -rwxr-xr-x 1 root root 190 wrz 30 17:57 run_slow.pl **************************** the difference is: 10c10,11 < my $lst = list_extr(\( "(" . $inp . ")" )); --- > my $par = "(" . $inp . ")"; > my $lst = list_extr(\$par); **************************** data is the same... let's run them... time ./run_fast.pl | wc -l 9506 real 0m0.476s user 0m0.456s sys 0m0.016s **************************** time ./run_slow.pl | wc -l 9506 real 0m22.591s user 0m22.556s sys 0m0.012s **************************** seee... programs are almost the same... but their time is totally difeerent