in reply to $#array issue

i want to print an array backward one element at a time

Another way to do it:

$ perl -le' my @array = 1 .. 9; for my $index ( 1 .. @array ) { print $array[ -$index ]; } # "pop" the elements off splice @array; ' 9 8 7 6 5 4 3 2 1