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

Re: Using Getopt::Long it input different data sets

by Hofmator (Curate)
on Oct 10, 2006 at 13:20 UTC ( [id://577408]=note: print w/replies, xml ) Need Help??


in reply to Using Getopt::Long it input different data sets

The simple while (<>) {} was designed for this case. If you have no command line arguments, this reads from STDIN, otherwise treats all arguments in @ARGV as filenames, tries opening them and reads from all of them sequentially. See perldoc perlop under I/O Operators.

-- Hofmator

Code written by Hofmator and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Replies are listed 'Best First'.
Re^2: Using Getopt::Long it input different data sets
by chinamox (Scribe) on Oct 10, 2006 at 14:35 UTC

    Thank you very much for your clairification. I am going back over perlop again right now...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-25 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found