more useful options | |
PerlMonks |
Re: Finding Line numbers in a fileby davidrw (Prior) |
on Apr 04, 2007 at 14:12 UTC ( [id://608282]=note: print w/replies, xml ) | Need Help?? |
do you have to have the whole file in $ctfilebuf? It will be a lot easier if you simply read/scan it line by line .. you can keep a counter of the line numbers (or use the $. variable -- see perlvar) Also, grep -n Cell log.txt from the commandline accomplishes this as well
In Section
Seekers of Perl Wisdom
|
|