in reply to Cant find out how to get the real file handle name!
That code dies saying "can't use string 'SCALAR(0x...)' as scalar reference..." or something like that. A solution is to keep two hashes.use strict; my $x = "foo"; my $y = \$x; my %foo = ($y => "bar"); for (keys %foo) { print $$_ }; # hoping to print 'foo'
Now you can access $refs{$_} to get at the REAL reference.my %foo = ($y => "bar"); my %refs = ($y => $y);
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker, who'd like a (from-home) job
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|