I don't understand why they used <>.
This returns the first line of the first file passed. Not the first argument on the command line.
You're right they'd have to chomp it if the filenames were listed at the start of each file but seeing as I don't think they meant that. shift of the @ARGV array is fine and wouldn't need chomping.