local $/ = ''; while (<$fh>) { if ( my ($table) = /^ADD TABLE "([^"]+)"/ ) { ... } elsif ( my ($field, $table, $type) = /^ADD FIELD "([^"]+)" OF "([^"]+)" AS (\w+)/ ) { my ($format) = /^ FORMAT "([^"]+)"/m; ... } }
And note the 'm' modifier on the regexp to change the meaning of '^'.
In reply to Re: How to skip a line?
by ikegami
in thread How to skip a line?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |