http://www.perlmonks.org?node_id=655145

kmullin has asked for the wisdom of the Perl Monks concerning the following question:

I am a perl newbie, and am feeling very frustrated with this language. All I want to do is process command line arguments. In my PERL book, I see how to do this. So, I have a command:

#!/opt/third/party/bin/perl -w print "Start of testARGV.pl\n"; if ($#ARGV != 0) { foreach( @ARGV ) { print $_; } }

But when I try to run this, I get:

Start of testARGV.pl ./testARGV.pl:3: command not found: 0 ./testARGV.pl:5: unknown file attribute

What is going on here. The only '0' in my program is in the test to see if I even have command line arguments.

I'd appreciate any perls of wisdom you may have for me.