in reply to How to skip a line?
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 '^'.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to skip a line?
by Anonymous Monk on Jun 04, 2008 at 10:19 UTC | |
by jethro (Monsignor) on Jun 04, 2008 at 11:29 UTC |