in reply to Automatic documentation stubs for .pl source

Something like (untested):
if ($content =~ /^sub\s+(\w+)[^#]*(?:#(.*))?$/) { print "Subname: $1\n"; print "Comment: $2\n" if defined $2; }

Note that it will fail to catch subs with attributes, or subs with a fully qualified name.

Abigail