in reply to Re: Opening a File from the Command Line
in thread Opening a File from the Command Line
[the diamond operator] assumes all the words entered on the command line are file namesNo it doesn't. The diamond operator will read from all the elements of @ARGV as if they are files. That may, or may not, be the same as the command line arguments.
It then combines all the files into one big fileNo, it doesn't do that either. It reads each file line by line, setting $ARGV to the name of the file currently being read.
See I/O operators for <>, @ARGV and $ARGV for further reading.
|
|---|