in reply to how to store text file information into my sql database
If your input file is tab delimited, adjust your split statement:
(When you do the default "split" with no regex, it splits the string on one or more contiguous white-space characters of all kinds.)my @vals = split /\t/;
If the file uses fixed-width, space-padded columns, use "unpack" as described in a previous reply.
(*) UPDATE - a better explanation of "fixed-width columns" (because my original wording was not very good): every row (line of text) would have the same number of characters; the columns in a given row can be various sizes, but each column has the same size on consecutive rows, so that column boundaries are always at the same offsets from the start of the row, and strings contained in each column would be padded with spaces as needed to maintain the character offset to the next column (or end of line).
|
|---|