@ARGV is the array that holds command line arguments. However, unlike other languages such as C, the program name is not the first index of the argv array. In Perl, this value is stored in the $0 variable.
Thus, @ARGV is uninitialised in your program because you don't run it with command-line arguments. If you run it like this...
./file.pl file1.txt file2.txt
Then $0 is file.pl, $ARGV is file1.txt, and $ARGV is file2.txt.