http://www.cyberciti.biz/faq/howto-pass-perl-command-line-arguments/ How do I read or display command-line arguments with Perl? Perl command line arguments stored in the special array called @ARGV. ARGV example Use $ARGV[n] to display argument. Use $#ARGV to get total number of passed argument to a perl script. For example, if your scriptname is foo.pl: ./foo.pl one two three You can print one, ..