use Data::Dumper; use strict; my @foo=qw / a b c d e f / ; printf "Before:\n"; print Dumper(\@foo); $#foo--; printf "After:\n"; print Dumper(\@foo); #### Before: $VAR1 = [ 'a', 'b', 'c', 'd', 'e', 'f' ]; After: $VAR1 = [ 'a', 'b', 'c', 'd', 'e' ];