Code Comments
Programming Forum and web based access to our favorite programming groups.If I call a perl module with a hash variable, like so... pass1(\%myhash); The hash shows up in $_[0] and the debugger thinks it is a hash. I can even use $_[0] as a hash over in the module. Still normal so far. But if I do %anotherhash = $_[0], I get an undef in %anotherhash. Insights anyone?? krf
Post Follow-up to this message"krf" <krf@Vega.com> wrote in message news:pan.2004.09.30.00.31.10.861598@Vega.com... > If I call a perl module with a hash variable, like so... > > pass1(\%myhash); > > The hash shows up in $_[0] and the debugger thinks it is a hash. > > I can even use $_[0] as a hash over in the module. > Still normal so far. > > But if I do %anotherhash = $_[0], I get an undef in %anotherhash. > > Insights anyone?? > > krf I think you need to do: %$anotherhash = shift; or $foo = shift; %anotherhash = %$foo;
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.