# Foo.pm package Foo; ... sub foo { for (@_) { Foo->new($_)->blah->print; } } 1; #!/usr/bin/perl # Foo wrapper script use Foo; Foo::foo(@ARGV);