sub getVendorData { my ($code) = @_; my $returnedVal = 0; if($code =~ m/<%(\w+)%>/) { # need to do something special with this vendor my $module = $1; # $module is the package name # (it could be one of 7 different values) # where we'll add any custom stuff that needs to happen for a # particular vendor use Modules::$process; # for example my $vendor = $process->new(); # for example my $returnedVal = $vendor->getVendorData(); } return $returnedVal; }