in reply to Re: How to skip a line?
in thread How to skip a line?
local $/ = ''; # run script while (<$INFILE1>){ # define variables $FULL_LINE = $_; $TABDISPLAY = 0; $FIELDDISPLAY = 0; $DATEFIELD = 0; $SHORTLINE = substr($FULL_LINE,0,length($FULL_LINE)-2); @LINEARRAY[0..9] = split(/"+/, $SHORTLINE); # decide if input line is table name or field name if ( my ($table) = /^ADD TABLE "([^"]+)"/ ) { $TABDISPLAY=1; print OUTFILE3 ("table=" . "$table \n"); } elsif ( my ($field, $table, $type) = /^ADD FIELD "([^"]+)" OF "([^"]+)" AS (\w+)/ ) { my ($format) = /^ FORMAT "([^"]+)"/m; $FIELDDISPLAY=1; my ($format)=$FIELDLENGTH; print OUTFILE3 ("field=" . "$field \n"); print OUTFILE3 ("type=" . "$type \n"); print OUTFILE3 ("length=" . "$FIELDLENGTH \n"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to skip a line?
by jethro (Monsignor) on Jun 04, 2008 at 11:29 UTC |