@examples = split /\n/, <<'EXAMPLES'; sin / ... time / ... localtime / ... caller / ... eof / ... use constant FOO => 35; FOO / ... use Fcntl qw(LOCK_SH); LOCK_SH / ... sub no_args (); sub no_args{1}; no_args / ... sub one_arg ($); sub one_arg{1}; one_arg / ... sub normal (@); sub normal{1}; normal / ... EXAMPLES for (@examples) { s=\.\.\.=25 ; # / ; die "this dies!";=; local($a) = eval; $a = $@ if $@; print "$_\n\t$a\n"; }