in reply to Re: unreadline function?
in thread unreadline function?
while($line=<>) { chomp $line; if($line=~/^\*\*\* DOCUMENT BOUNDARY \*\*\*/) { check(); print "$line\n"; next; } if($line=~/^FORM=/) { check(); print "$line\n"; next; } if($line=~/\.\d\d\d\./) { check(); $started_tag = 1; } $tag.=$line; } sub check() { if($started_tag) { print "$tag\n"; undef $tag; $started_tag = 0; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: unreadline function?
by esskar (Deacon) on Mar 01, 2004 at 04:49 UTC | |
|
Re: Re: Re: unreadline function?
by aquarium (Curate) on Mar 01, 2004 at 04:43 UTC |