I am trying to access the values which is defined inside a subroutine . Here is the code flow
Sub a { my @array = (1, 2, 3); } Sub b { foreach $value (@array) }
I tried to define array as "our " keyword in Sub a. But, it is not retaining the values when it is accessesed inside Sub b . Is there a way to make it work
In reply to Accessing values outside subroutine by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |