Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^4: Is foreach split Optimized?by haukex (Archbishop) |
on Jul 11, 2017 at 10:45 UTC ( [id://1194804]=note: print w/replies, xml ) | Need Help?? |
Thank you Steve and Laurent! It seems that I was testing on one of the few versions of Perl where the filehandle version is a bit slower. It does make sense that the filehandle version is faster, considering that it doesn't actually split the string (and $/ being a fixed string instead of a regex might contribute a little bit). So I think the filehandle version is clearly the best :-)
In Section
Seekers of Perl Wisdom
|
|