checks.pl use strict; use warnings; use check_module; my $home_dir = '/home/mine/'; for my $check ( @checks ) { print "Checking $check->{name}\n"; `check->{script}`; } check_module.pm package check_module; use Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(@checks); our @checks = ( { name => "Anybody home?", script => qq/echo $home_dir/, }, ); 1;