Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How do I read the files in @ARGV one by one

by busunsl (Vicar)
on Mar 19, 2001 at 20:55 UTC ( #65456=note: print w/replies, xml ) Need Help??


in reply to How do I read the files in @ARGV one by one

Have a look at 'eof', it will tell you when a file ends.

perldoc -f eof

  • Comment on Re: How do I read the files in @ARGV one by one

Replies are listed 'Best First'.
(tye)Re: How do I read the files in @ARGV one by one
by tye (Sage) on Mar 19, 2001 at 21:19 UTC

    I'd like to encourage you to check out the above advice.

    Here is an alternative that I am becoming fond of:

    my @data; foreach my $file (@ARGV) { push @data, substr( $file, -12, 12 ); local( *ARGV ); @ARGV= ($file); push( @data, <> ); }

            - tye (but my friends call me "Tye")

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://65456]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2016-12-03 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (55 votes). Check out past polls.