use Smart::Comment;

引数の名前を知る方法 Data::Dumper::Names
Perl Hacksで紹介されていたSmart::Commentsもいい感じです。

#!perl -w
use strict;
use Smart::Comments;

sub f{
	my($foo, $bar, $baz) = @_;
	### $foo
	### $bar
}

f(42, ['xyzzy']);
__END__

結果:

### $foo: 42
### $bar: [
###         'xyzzy'
###       ]