in reply to Re: Global symbol requires explicit package name
in thread Global symbol requires explicit package name

Thank you so much for your detailed reply. Sorry I left out this subroutine.
The reason I'm using this is to share the array of arrays. I'm very new with perl how do you suggest I share this array of array instead of using this subroutine?


sub make_shared_array {
my $a = &share([]);
for (my $i = 0;$i <6 ; ++$i) {
my $row = &share([]);
$a->[$i] = $row;
}
return $a;
}
Thank you so much!!! I greatly appreciate all your help

Replies are listed 'Best First'.
Re^3: Global symbol requires explicit package name
by 2teez (Vicar) on Aug 14, 2012 at 07:06 UTC
    hi,

    how do you suggest I share this array of array instead of using this subroutine?

    from your Code:
    What is &share([]);?
    Are you trying to call a Subroutine reference within another subroutine, then assign to a scalar variable? Really, I don't know what you want to achieve here Please.
    You probably have to include all the subroutine you are trying to use.