# Print the specified section from STDIN (or file redirect) # Sections use BEGIN/END and are delimited using HTML comments # $module = shift(@ARGV); while (<>) { $begin = 1 if //; $end = 1 if //; print if $begin && ! $end; }