in reply to Re: problem with variables in hash values??
in thread problem with variables in hash values??

Bah! So using a variable there is not useful. Hopefully I'll discover another way to do this when I learn more. Well, at least now I know, so I won't spend hours trying to figure out how to make it work.

Thanks!!

  • Comment on Re: Re: problem with variables in hash values??

Replies are listed 'Best First'.
Re: Re: Re: problem with variables in hash values??
by belg4mit (Prior) on Dec 05, 2001 at 04:30 UTC
    Consider a *reference* to a variable:
    $magic=4; #same as 2*2 last time I checked ;-) %items=(1 => \$magic); print "1: ${$items{1}}\n"; $magic+=1; print "1: ${$items{1}}\n";
    See perlref

    --
    perl -p -e "s/(?:\w);([st])/'\$1/mg"