On Thu, 24 Jan 2002 16:50:06 -0600, Jeff Mirabile wrote:

>It's four types of records that are fixed length fields, but needs alot of
>cleaning.

I fail to see why you want shoehorn such a simple problem into such a
rather inapproriate tool like DBI. For just processing text files line
by line, Perl does a great job all on its own.

        while(<>) {
            chomp;
            my($one, $two, $three, $four) = unpack 'A10A15A20A25', $_;
            ...
        }

This will split a line into four fixed length parts, of resp. 10, 15, 20
and 25 bytes (Ascii characters). Trailing spaces will be removed.
If you don't want that, use "a" instead of "A". See "perldoc -f pack"
for other options.

-- 
        Bart.

Reply via email to