Or use File::Slurper. Nice clean interface, and I believe the author actually looked into what's the fastest approach.
In reply to Re^2: RE on lines read from in-memory scalar is very slow
by ikegami
in thread RE on lines read from in-memory scalar is very slow
by Danny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |