in reply to Re^2: how to store text file information into my sql database
in thread how to store text file information into my sql database

There is a CPAN module DataExtract::FixedWidth for handling the fixed unpacking details. I tried it on the test sample and it seems to work fine.

use strict; use warnings; use DataExtract::FixedWidth; use Data::Dumper; my $de = DataExtract::FixedWidth->new({ header_row => scalar(<DATA>) }); while (my $l = <DATA>) { my $fields = $de->parse($l); print Dumper($fields); } __DATA__ StudentId Name Dept address city 1 Chellappa CSE 22 xx-colony 2nd street coimbatore 2 Vijay IT 23 yy colony coimbatore
Ron