#!/usr/bin/perl -w
use strict;
foreach my $i(0..$#ARGV){
printf "\$ARGV[%d] = \"%s\"\n",$i,$ARGV[$i];
}
while(my $arg=shift @ARGV){
printf "%s\n",$arg;
}
#
# -------------- 8< snip! 8<-------------
$ ./shifty.pl a b c d e f g
$ARGV[0] = "a"
$ARGV[1] = "b"
$ARGV[2] = "c"
$ARGV[3] = "d"
$ARGV[4] = "e"
$ARGV[5] = "f"
$ARGV[6] = "g"
a
b
c
d
e
f
g
I think the issue you are a having is you didn't shift prior to setting $argument.
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg