develooper Front page | perl.beginners | Postings from March 2002

return new hashref

Thread Next
From:
Jan Gruber
Date:
March 1, 2002 04:39
Subject:
return new hashref
Message ID:
200203011238.g21Ccfi24504@pollux.intern.primacom.net
Hi, List !

I'm trying to build a linked list, containing hashrefs.
Walking through the %HashRef (-x %HashRef) i can see a lot of 
'REUSED_ADDRESS'es in the list. At the end, all refs point to one single 
adress, so every HashRef in my list points to the same hash.

I have considered trying the OO way, but this would require a major rewrite 
of the program. This could be done later on, but for the moment, i would be 
happy with another way. 

How do i return a new (read: different) Hashref from a sub on each call ?
  
-- 
cat /dev/world | perl -e "while (<>) {(/(^.*? \?) 42 \!/) && (print $1)}"
errors->(c)
_ 

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About