for INDEX: @ARGV is an array of command line arguments. Since you only have 1, the filename, its going to be zero in all cases.
For SYNTAX:
To quote Larry Wall (an important guy if you program perl) "There's more then one way to do it." If your instructor is looking for a specific answer, these may not be it.
1: scalar (@ARGV) == 1 #make sure there is exactly one argument
2: d #-d file test is only true if testing a directory
3. while # while loop such as that will continue until the end of the file is reached and line is set to a null value (0 or empty string for perl).
Also, make sure you close the file handle at the end of the program. Leaving them open, while not necessarily harmful, is not a good practice to be in.