my @array = (split/\n/, $data); my $firstmatch = $array[3]; my $secondmatch = $array[4]; #### Open the file split the records parse this data insert it into db close file