in reply to Re^5: Global vs. local?
in thread Global vs. local?
While the name is weird, if you're using a variable to hold it, you can perfectly call the subroutine through that name. And using weird names is good for named subroutines that get autogenerated by code:
my $subname = '1Button_Click'; *{$subname} = sub { print "Hello World\n"; }; no strict 'refs'; $subname->();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Global vs. local?
by shmem (Chancellor) on May 29, 2009 at 18:04 UTC |