There's more than one way to do things | |
PerlMonks |
Re^2: More efficient way to exclude footersby Laurent_R (Canon) |
on Aug 19, 2015 at 18:59 UTC ( [id://1139215]=note: print w/replies, xml ) | Need Help?? |
Why not, but if the file is very large you're doing a $linecount incrementation and a test for every line in the file. is just reading the first $numHeaders lines of the file and throws them away, and you don't add any overhead for the rest of your file. And, BTW, the $. special variable contains the line count of the last read file handle, so that you don't need the $linecount incrementation.
In Section
Seekers of Perl Wisdom
|
|