I have also discovered that the following syntax also works.
sub accept_out_cclose_after {
my $tkxfsr=shift;
my $afterid=shift;
my $delay=shift;
my $send_id;
if ($esub==1) { $send_id=Tkx::after( $delay , sub{&{$tkxfsr->{aft
+er}{$afterid}{sub}}()});}
elsif ($esub==2) { $send_id=Tkx::after( $delay , [$tkxfsr->{after}{$
+afterid}{sub}] );}
else { $send_id=Tkx::after( $delay , $tkxfsr->{aft
+er}{$afterid}{sub} ); }
$tkxfsr->{after}{$afterid}{eventid}=$send_id;
$tkxfsr->{after}{$afterid}{delay}=$delay;
}
perl huh-after.pl -esub 2
And i suspect that the [] notation in the Tkx::after call is doing the same thing i did with the sub {}, creating a one use anonymous subroutine reference.