Here's another option:
for(split /\n/, $old_entires) { my($count, $num, $new_entry) = qw(0 0); map{$new_entry .= $_ . ($count++ < $num-1 ? '(' . $count . ')': "\ +n")} grep{!/\(arch\)/ && ++$num} split / ?\(\d\)/; print $new_entry; }
Hope this helps!
In reply to Re: Removing with regexps
by Kenosis
in thread Removing with regexps
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |