On Wed, Oct 22, 2003 at 02:26:50PM -0400, Steve Grazzini wrote: > #!/usr/bin/perl > # > # [ untested ] > #
And it shows... :/ > die "Usage: $0 ERROR\n" unless @ARGV; > > my $num = shift; > my $rx = qr/^#error$num$/; > > while (<>) { > my $range = /$rx/ .. /$rx/; You'd actually need the "sed" version here: my $range = /$rx/ ... /$rx/; > next unless $range; # outside group > next if $range == 1; # first line > last if $range =~ /E0/; # last line > > s/^#\s+//; > print; > } -- Steve -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]