Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Line number in a file

by busunsl (Vicar)
on Jul 06, 2004 at 08:37 UTC ( #372042=note: print w/replies, xml ) Need Help??


in reply to Line number in a file

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://372042]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2018-07-21 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (444 votes). Check out past polls.

    Notices?