Re: Problem by pushing a String and a Hash on an array!



On 12/30/2006 03:46 PM, pod69@xxxxxxx wrote:
Hello,

I try to push on an array(global) a string and a hash ->
push(@array,{name => $n_name, hash => \%myhash});

now i try to read out everything but i have a problems with the array?
I try this to read everything out:

sub println {
for(my $i = 0; $i < scalar(@array) ; $i++ ){
print $array[$i]{name};
my %hash = $array[$i]{hash};

"$Array[$i]{hash}" contains a hash *reference*--not a complete hash. You must de-reference the hash reference before assigning it to a new hash:

my %hash = %{ $array[$i]{hash} };

foreach $key ( keys %hash){
print $key." = ".$hash{$key}."\n"
}
}
}

the name gets printed out but not the hash?

thx


I hope this helps.

--
paduille.4060.mumia.w@xxxxxxxxxxxxx
Windows Vista and your freedom in conflict:
http://www.badvista.org/
.



Relevant Pages

  • Re: How to write a diff in VB6 for comparing two xml files?
    ... No, the best you could do is to read both into string and use StrCompbut it's inefficient and, but using the hash ... Private Declare Function CryptAcquireContext Lib "AdvAPI32.dll" Alias _ ... Dim HashAAs Byte, HashLenA As Long ...
    (microsoft.public.vb.general.discussion)
  • Re: something like switch in c
    ... >> straightforward string comparisions. ... > inner table size and/or add symbols to expand the hash. ... It all depends on the empirical pattern of the actual keys. ... The value of the random number generator is UNCHANGED on ...
    (comp.programming)
  • Re: How to make PKCS#7 signature using CryptoAPI?
    ... Those MSDN samples hash a string PLUS the null byte (so that it ... I tried your sample and had no problem verifying with openssl (after I added ... functions (including CryptSignMessage). ...
    (microsoft.public.platformsdk.security)
  • Re: How to make PKCS#7 signature using CryptoAPI?
    ... "Mitch Gallant" wrote: ... Those MSDN samples hash a string PLUS the null byte (so that it ... functions (including CryptSignMessage). ...
    (microsoft.public.platformsdk.security)
  • Re: Base36
    ... static string tokens = ... But - I don't think you want all those silly characters in the product key. ... I should be able to recalc the hash at the client ... > conversion to long so I can pass each long to the BaseXX converter to get ...
    (microsoft.public.dotnet.languages.csharp)