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

Re: skipping the first line of a file

by Transient (Hermit)
on Jun 12, 2009 at 13:50 UTC ( #770973=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $first_line = <DATA>;
     
    while (<DATA>) {
      ...
    }
    
  2. or download this
    while (<DATA>) {
      next if $. == 1;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2023-04-01 19:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?