more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You might consider this a nitpick, but the replies by pelagic and busunsl need a clarification.
To the best of my knowledge, the built-in Perl variable $. is technically the record number variable, not the line number variable, and a record is not always a line. It all depends upon the value of $/, the record separator variable. By default it is newline, but it can be changed. I mention this only because I once had a terrible time debugging a (poorly written) script which read from a file, used $., and the script writer had changed the value of $/. It took me some time to figure that out. davidj In reply to Re: Line number in a file
by davidj
|
|