#!/usr/bin/perl use strict; use warnings; my $name = shift; my $func = "update_$name"; main->$func(); # "main" should be the namespace the functions are in. sub update_test { print "!test\n" } sub update_hello { print "hello!\n" }