![]() |
|
Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Skipping the header in a for loop (implied with a statement modifier) is quite flexible as you can skip one, two or many lines with equal facility. It also has the advantage that the scalar receiving the readline only exists within the loop.
I hope this is of interest. Cheers, JohnGG Update: Fixed typo. Update 2: ikegami has pointed out that this code is invalid and explained why so don't do this. In reply to Re: skipping the first line of a file
by johngg
|
|