Help for this page
sub debuglogger { my $msg = shift; ... print STDERR "$msg\n"; } }
's/sub\s+(\w+)\s+{/sub $1 { debuglogger("entering $1"); /'