in reply to Re: Better solution to the code
in thread Better solution to the code
But that reminds me of another possible optimization: if @tag doesn't contain regexes but only constant substrings, index might speed up things.
So instead of if ($_ =~ m/$something/){ ... }, you can write if (0 <= index $_, $something).
|
|---|