in reply to Re: REF instead of HASH-ref
in thread REF instead of HASH-ref
i get REF. if i domy %list = ( 'lang' => 'de' ); my $listref = \%list; print ref($listref);
i get HASH.my $listref = { 'lang' => 'de' }; print ref($listref);
i then just pass \%list along to a function which takes the refenrence and uses the hash again. i used exactly this code (copy/paste) in another app, there it worked fine. the environment is the same, too.use vars qw($query @parname %list $n ); $query = new CGI; @parname = $query->param; foreach $n (@parname) { $list{$n} = $query->param($n); }
everything works fine. hm...$query = new CGI; @parname = $query->param; foreach $n (@parname) { $hashref->{$n} = $query->param($n); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: REF instead of HASH-ref
by VSarkiss (Monsignor) on Sep 15, 2004 at 15:06 UTC | |
by zetetes (Pilgrim) on Sep 15, 2004 at 19:54 UTC |