sub foo { my $retval = 0; <... lots of code here ...> return $retval; # This is the only return in the sub } #### ... my $whatever = some_sub(); #### my $var1; my $var2; my $var3; my @list; my %hash; ...