Re: hash return from a sub

2008-04-29 Thread Flyzone
On 29 Apr, 01:03, [EMAIL PROTECTED] (Andrew Curry) wrote: > Ill make a guess it's a scope issue Yep, found the error > my(%myhash,$var1,$var2); I forgot to declare the 'myhash' into the sub. Done that now is working. :-) Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

hash return from a sub

2008-04-28 Thread Flyzone
How can i return a copy of the hash? (The hash is build correct, but return alsways null) Here a sample of my code: sub mysub { while (.) { var1 = ; var2 = ; $myhash{$var1} = $var2; } print %myhash; # all ok until here return ( %myhash ); } %