Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Jim Gibson
May 1, 2009, 11:16 pm
rate this thread
The null file handle <> has just that behavior. See 'perldoc perlop'
and search for "I/O Operators".
You can use the following while loop in your program:
to do what you want. The elements of @ARGV are used as file names to
read. If empty, standard input will be read. You can also use "-" as a
file name to read standard input. You can manipulate the contents of
@ARGV before the loop to specify the files to read.
- » FAQ 5.38 How do I select a random line from a file?
- — Next thread in » PERL Discussions
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum