#!/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