use strict; use warnings; my @array = qw(file1 file2 file3 file4 file5 file6 file7 file8 file9); + #array with file names my @reversed_array = reverse @array; #reverse @array so reading from t +he last element my @files; #this array will contain 8 file names once done for(0 .. 7 ){ #8 iterations push @files, $reversed_array[$_]; } #print "$_\n" for reverse @files; print "$_\n" for @files;
In reply to Re: Rolling variable
by james28909
in thread Rolling variable
by artperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |