in reply to ARGV Usage

I'd have to agree with andyford. You code is doing the correct thing from a perl perspective:

#!/usr/bin/perl use strict; use warnings; my $infile_name = shift( @ARGV ); print $infile_name, "\n";
when called, does:
> ./test.pl foo.txt foo.txt
So are you expecting test.pl to be in the @ARGV array? This is one place where perl differs from other programming languages. @ARGV is not populated with the name of the invoked program (ala C) - that's in the magic variable $0.

-derby