Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: skipping the first line of a file

by Bloodnok (Vicar)
on Jun 12, 2009 at 15:13 UTC ( [id://770992]=note: print w/replies, xml ) Need Help??


in reply to skipping the first line of a file

TIMTOWTDI ,

The other suggestions thus far assume a line-by-line read of the file, if you're slurping the file in, howz about...

my ($first, @rest) = <DATA>; warn "first: $first"; warn "rest:\n@rest"; __DATA__ header line1 line2
user@unforgiven:~$ perl tst.pl first: header rest: line1 line2 user@unforgiven:~$
A user level that continues to overstate my experience :-))

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-19 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found