require "SomePackage.pl'; $SP = new SomePackage; @array = qw(one.txt two.txt three.txt); $SP->print_filename(@array,$arg1,$arg2);