use strict; require 'foo_bar.pl'; #currently using require for these require 'foo_batz.pl'; #intention is to fold them into the #script after development my @Stack = (); my $type = "Bar" || "Batz"; do_phu($type); sub do_phu { my $class = shift; my $temp_obj = Foo::$type->new(); push( @Stack, $temp_obj ); # point of failure }