Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Using Getopt::Long it input different data setsby Hofmator (Curate) |
on Oct 10, 2006 at 13:20 UTC ( [id://577408]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|