shift, with no arguments, and when not in a subroutine, shifts elements off of the @ARGV array (the command line args, see
perlvar). The
<> operator is a shortcut to
readline (sort of, see
perlop, and with no arguments, will open files named in @ARGV and read lines from the file.