Yuck.use strict; use warnings; package Acme::Bad::Idea { sub new { bless {}, shift } sub do_not_do_this { warn shift; ...; } }; my $bad_idea = Acme::Bad::Idea->new(); # @ARGV = qw[do_not_do_this seriously]; $bad_idea->can( $ARGV[0] )->( $ARGV[1] );
In reply to Re: How do I call a sub using a variable as its name, objectively
by SankoR
in thread How do I call a sub using a variable as its name, objectively
by misterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |