#use strict; #!/usr/bin/perl -w use strict; my %lists = ( 'test1' => "stuff", 'test2' => "things" ); for my $i (keys %lists) { &$i(); } sub test1 { print "New message for test1\n"; } sub test2 { print "New message for test2\n"; }