More there are:
use strict; use warnings; sub tst { warn "tst($_[0]) called\n" } my $symbol="tst"; ($::{$symbol})->(1); &{$::{$symbol}}(2); (main->can($symbol))->(3); &{main->can($symbol)}(4);
C:/Perl_524/bin\perl.exe d:/exp/symbolic_references.pl tst(1) called tst(2) called tst(3) called tst(4) called
NB:
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
In reply to Re^3: Function name in a variable, can't recall the concept
by LanX
in thread Function name in a variable, can't recall the concept
by mpersico
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |