Thank you in anticipationsub new { my $class = shift; my $self = {}; bless( $self, $class ); $self->{num} = shift; $self->{sub_ref} = shift; # JUST PASSING IN....REFERENCE TO EXTERN +AL SUB...\&ord_sub return $self; } sub doit { my $self = shift; #QUESTION...CAN I REDUCE THE NEXT TWO LINES TO ONE my $pSub=$self->{sub_ref}; $pSub->(); }
In reply to call external sub ref from method in single line by previous
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |