recurse(split('','Hello World')); sub recurse { my ($car,@cdr) = @_; print "$car\n"; @cdr and recurse(@cdr); } #### foo( array => [0..9], scalar => 'Hello World', hash => {qw(foo bar baz qux)}, ); sub foo { my %args = @_; print 's: ', $args{scalar},"\n", 'a: ', join(',', @{$args{array}}),"\n", "h:\n", map "\t$_ => $args{hash}{$_}\n", keys %{$args{hash}}, ; }