The diamond operator <>, works just like the
<STDIN> operator, except it gets it inputs from a different
source then the Standard Input pipe.
Instead, <> reads successively through each line
of all files specified on the command line that invoked the Perl
program.
The <> operator does not return undef until all
lines from all specified files have been read.
Example:
# Another Cat. Dump the contents of all files specified on command line
while ( <> ) {
$userInput = $_;
print $userInput;
}
Note that in actuality, the <> operator works on
the @ARGV array, which by default contains the command line
arguments. If you wish, you may replace this array with your own
values and continue to use the <> operator.