Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: reading the file using the line number

by davorg (Chancellor)
on Nov 29, 2006 at 10:20 UTC ( #586650=note: print w/replies, xml ) Need Help??


in reply to Re: reading the file using the line number
in thread reading the file using the line number

perl -ne 'print if $. = $number; exit if $. > $number;'

You probably want '==', not '=', there.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

  • Comment on Re^2: reading the file using the line number

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2021-09-22 02:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?