|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re: Line number in a fileby busunsl (Vicar) |
| on Jul 06, 2004 at 08:37 UTC ( #372042=note: print w/ replies, xml ) | Need Help?? |
|
When you read the file line by line, $. will give you the current linenumber. If you just slurp it, you'll have to set up a counter.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||