Passing hashes by reference.

From: krf (krf_at_Vega.com)
Date: 09/30/04

  • Next message: DiscoMachineGun: "Re: clear contents of array"
    Date: Wed, 29 Sep 2004 19:31:10 -0500
    
    

    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


  • Next message: DiscoMachineGun: "Re: clear contents of array"

    Relevant Pages

    • Re: How to increase performance BerkeleyDB?
      ... or Hash, $str or md5for key) and choose B-tree with md5 ... 200s - Btree ... Still a mass of quivering Jello. ... The Perl module BerkeleyDB is a pretty thin wrapper that mostly just sends ...
      (comp.lang.perl.modules)
    • Re: Adding a unique user name in a file
      ... > sam wrote: ... >>Is there any perl module I can use to read in a list of user names ... >>from a file and do a binary search on the list base on the user name, ... If you read the user names into a hash then ...
      (comp.lang.perl.misc)
    • Re: Encrypt Windows Password
      ... I want to write a perl module that encrypts a clear password to a windows ... I didnt find any algorithm that builds the hash expect copypwd.exe which ...
      (comp.lang.perl.misc)
    • Re: Encrypt Windows Password
      ... I want to write a perl module that encrypts a clear password to a windows ... I didnt find any algorithm that builds the hash expect copypwd.exe which ...
      (comp.lang.perl.misc)
    • Re: [opensuse] What is Lchown? (rsnapshot)
      ... Hash: SHA1 ... It could be a packaging issue, it could also be a mixture of Perl module ...
      (SuSE)