in reply to Re: Nervously....How do I access the Name of a Perl variable?
in thread Nervously....How do I access the Name of a Perl variable?
#!/usr/bin/perl -w use strict; #define TRACE(x) print "$0 line ". __LINE__ .":\t". x ." = ". eval +(x). "\n"; my $foo = 7; TRACE('$foo'); $foo *= $foo; TRACE('$foo'); __END__ Prints: /tmp/test.pl line 8: $foo = 7 /tmp/test.pl line 11: $foo = 49
--
John.
|
|---|