Beginners Intro to Perl - Part 6 - Perl.com says:
1.
Name ``main::filename'' used only once: possible typo at ./a6-warn.pl line 3. and
Name ``main::fn'' used only once: possible typo at ./a6-warn.pl line 4. Perl notices that $filename and $fn both only get used once, and guesses that you've misspelled or misnamed one or the other. This is because this almost always happens because of typos or bugs in your code, like using $filenmae instead of $filename, or using $filename throughout your program except for one place where you use $fn (like in this program).
You can run CGI on the command line, just set the variables it reads.