Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://608282]
help
Chatterbox?
[Corion]: A good morning ;)
[Your Mother]: Mooooooooo…rning

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2017-07-26 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (384 votes). Check out past polls.