Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Finding Line numbers in a file

by davidrw (Prior)
on Apr 04, 2007 at 14:12 UTC ( #608282=note: print w/ replies, xml ) Need Help??

in reply to Finding Line numbers in a file

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

Comment on Re: Finding Line numbers in a file
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://608282]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2015-11-29 21:30 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (753 votes), past polls