#!/usr/bin/perl use warnings; use strict; { package My; sub new { bless {}, shift } sub show { my ($self, $name) = @_; print "Hello $name!\n" } } my $A = 'My'->new; my $method = shift; $A->$method(@ARGV); #### $ 1.pl show World Hello World! #### $A->${\ $ARGV[0] }(@ARGV[1 .. $#ARGV]);