S
Stuart Kendrick
how do i print the name of the subroutine to which a code ref points?
#!/opt/vdops/bin/perl
use strict;
use warnings;
my $ref;
$ref = \&foo;
print "&$ref\n";
sub foo {
# Do nothing
}
guru% ./test
&CODE(0x815bed0)
guru%
I would like to see "&foo" instead of "&CODE(0x815bed0)".
--sk
stuart kendrick
fhcrc
#!/opt/vdops/bin/perl
use strict;
use warnings;
my $ref;
$ref = \&foo;
print "&$ref\n";
sub foo {
# Do nothing
}
guru% ./test
&CODE(0x815bed0)
guru%
I would like to see "&foo" instead of "&CODE(0x815bed0)".
--sk
stuart kendrick
fhcrc