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 reply to Re^4: Is foreach split Optimized?
by haukex
in thread Is foreach split Optimized? (Update: No.)
by haukex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |