For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > October 2006 > Re: Prefix printed lines on screen with a line number. Need advice.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Prefix printed lines on screen with a line number. Need advice.
Jay

2006-10-01, 6:58 pm

nobull67@gmail.com wrote:
> DJ Stunks wrote:
>
> Consider also using the magic ARGV filehandle and the implicit read
> into $_
>
> while(<> ) {
> print "$. $_";
> }
>
> Or at the command line:
>
> perl -ne'print "$. $_"'


Thanks. I got what I need.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com