gaurav has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks, I have got struck since morning on-wards that how I can get the full reverse number outside the for loop
#!/usr/bin/perl use warnings; use strict; my @number; my @rev; @number = (1,2,3,4); my $index1; for ($index1 = $#number; $index1 >= 0; $index1--) { @rev = $number[$index1]; #case1# print "@rev \n" ; } #case2# print "@rev \n";
I mean to say that in case 1, I am getting full reverse value,but while trying to print same outside of the for-loop , I am getting last one (means 1 only).I want to get the full reverse value outside for-loop.How would I get that
|
|---|