use strict; use warnings; use 5.012; use Person; my $obj = Person->new; $obj->do_this("Sam"); $obj->do_that("Cathy"); say '*' x 20; my @func_names = ('do_this', 'do_that'); my @names = ("Sam", "Cathy"); call_funcs(@names); sub call_funcs { for (@func_names) { $obj->$_(shift @_); } } --output:-- hello Sam goodbye Cathy ******************** hello Sam goodbye Cathy