Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: reading the file using the line number

by davorg (Chancellor)
on Nov 29, 2006 at 10:20 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-04-18 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found