my @array get values assigned in sub a . I think even if i define outside as below..it won't print anything in sub b
my @array; sub a { @array = (1,2,3); } sub b { foreach my $a (@array) { print "$a\n"; } }
In reply to Re^2: Accessing values outside subroutine
by Anonymous Monk
in thread Accessing values outside subroutine
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |