in reply to Parsing and \G and /g and Stupid User Tricks
$RID = "MEH|MED|MMD|MMS|CR1|FR1"; open (FIN, "<file.dpf"); my $filecontents = <FIN>; $filecontents =~ s/($RID)/\n$1/ig; my @filecontents = split('\n', $filecontents); my $count = 0; foreach my $record (@filecontents) { print ++$count . "\t$record\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Final Solution: Parsing and \G and /g and Stupid User Tricks
by tye (Sage) on Aug 08, 2000 at 21:30 UTC |