#!/usr/bin/perl -w use strict; my $outside=1; while (<>) { $outside = 0, next if (/^group:/); $outside = 1, next if (/^data:/); print unless $outside || /^\s*$/; }
Update: changed + to * in the print line's regex.
In reply to Re: File Parsing
by pfaut
in thread File Parsing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |