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; } }
In reply to Re: Re: unreadline function?
by aquarium
in thread unreadline function?
by aquarium
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |