in reply to Re: File slurping efficiency
in thread File slurping efficiency
You need to be very careful with study. To the best of my knowledge, it's always been very buggy. In fact, in later versions of Perl (not sure about 5.6), successful matches against $_ can fail if you're using study, even if the string your matching against isn't what you studied. Apparently, the only way to get around this is to explicitly undef the studied string as soon as you are done with it (see Mastering Regular Expressions, second edition, page 289).
If you're willing to risk the problems with study, you should go ahead and benchmark it, but I wouldn't bother with it, personally.
Cheers,
Ovid
|
|---|