# single arg, used for simple and dirty sub foo { my $arg = shift; } # more flexible, I've been using this more frequently for complex subs sub bar { my ($arg1, $arg2, @optionals) = @_; } # I want more sophisticated argument handling for optional args, so I pass a hash reference containing all the arguments in predefined keys sub bletch { my $href = shift; # will warn me if $href->{hello_sub} is not defined print 'hi!' if $href->{hello_sub}; }