or download this
The null filehandle <> is special: it can be used to emulate the behav
+ior of sed and awk. Input from <> comes either from standard input, o
+r from each file listed on the command line. Here's how it works: the
+ first time <> is evaluated, the @ARGV array is checked, and if it is
+ empty, $ARGV[0] is set to ``-'', which when opened gives you standar
+d input. The @ARGV array is then processed as a list of filenames. Th
+e loop
...
}