use warnings; use strict; package MY_FOO; my $str = 'this is the second argument'; MY_FOO->foo($str); sub foo { print "$_\n" for @_; } __END__ prints: MY_FOO this is the second argument