Michael#!/usr/bin/perl use strict; my @number; my @rev; @number = (1,2,3,4); my $index1 = @number; my $revIndex = 0; my $x = 0; for ($x= 0; $x < $index1 ; $x+= 1) { $revIndex = $index1 - $x; $rev[$revIndex] = $number[$x]; #case1# print "@rev \n" ; } #case2# print "@rev \n";
In reply to Re: accessing variable vaule outside for loop
by mtmcc
in thread accessing variable vaule outside for loop
by gaurav
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |