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);