Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Re: Skip 21 Lines

by merlyn (Sage)
on Apr 25, 2001 at 17:21 UTC ( [id://75438]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Skip 21 Lines
in thread Skip 21 Lines

You said:
Any reason you wouldn't use:
<HANDLE> for 1..21;
Yes. Try that with <ARGV> (aka <>) when there's only 15 lines in the files specified on the command line. After it hits EOF, it now starts reading unexpectedly from STDIN for the remaining 5 lines (after 1 undef for the eof), because the process starts over!

Moral: Always watch for an early EOF from a filehandle.

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-26 00:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found