Re: How to get the name of the variable a reference is "pointing" at

2007-11-20 Thread Frank Bergemann
Hi Paul, just another level of indirection - should have known that :-) - many thanks! rgds! Frank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: How to get the name of the variable a reference is "pointing" at

2007-11-20 Thread Paul Lalli
On Nov 20, 6:22 am, [EMAIL PROTECTED] (Frank Bergemann) wrote: > foreach my $ref (\%Hash1, \%Hash2, \%Hash3) { > while(my ($key, $value) = each(%$ref)) { > debug ("$key -> $value") > } > } > > I'd like to prefix the name of the

How to get the name of the variable a reference is "pointing" at

2007-11-20 Thread Frank Bergemann
Hi, foreach my $ref (\%Hash1, \%Hash2, \%Hash3) { while(my ($key, $value) = each(%$ref)) { debug ("$key -> $value") } } I'd like to prefix the name of the hash for the elements in my debug(...). How to get the name of what $r