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

Re: help with scalar references

Thread Previous
Jeff 'japhy' Pinyan
February 7, 2002 10:57
Re: help with scalar references
Message ID:
On Jan 16, Karthik Gurumurthy said:

>($a,$b,$c) = (\"1",\"2",\"3");
>%hash = ($a=>"hello",$b=>"Perl");

You cannot use references as the keys to a hash, because hash keys must be

If you're REALLY desperate, you can use Tie::RefHash, but I don't think
you should be so desperate.

Jeff "japhy" Pinyan
RPI Acacia brother #734
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About