my $found_port; foreach my $line (@port_file) { if ($line =~ /^Port\s$port/) { $found_port = 1; $template{port_def} = $line; } next unless $found_port; last if $line =~ /^#----/; print $line; }
-Mark
In reply to Re: Help Matching Sections of a file
by kvale
in thread Help Matching Sections of a file
by smaida
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |