in reply to Help Matching Sections of a file
for (@port_file) { $match = 1 if (/^Port\s*$port/); undef $match if (/^#-+/); print if ($match); } [download]