sub spiffy_little_function { my ($x,$y) = @_; my @params; # parameters to Foo::new my $o; # an object of class Foo my $z; # computed result before taxes my $t; # computed result after taxes @params=get_huge_list_of_parameters($x); $o = Foo->new(@params); $z=$o->compute_result($y); $t = $z * 0.10; return($t) }