A
a22catcher
Hi,
I have the following function, that returns a reference to a local (my)
variable:
sub getSomething {
my %something = ();
...
...
return \%something;
}
Is it valid? (when I checked the return value from the outside, it
seemed right,
but it seems wrong to return a reference to a local variable - or is it
just C thinking?).
What's the prefered way to do something like this?
Thanks a lot
I have the following function, that returns a reference to a local (my)
variable:
sub getSomething {
my %something = ();
...
...
return \%something;
}
Is it valid? (when I checked the return value from the outside, it
seemed right,
but it seems wrong to return a reference to a local variable - or is it
just C thinking?).
What's the prefered way to do something like this?
Thanks a lot