in reply to Reading data from file

I would need to see your code to guess why data is getting lost, but in general here is how you would split these records as you require(untested):

while (my $line = <DATA>) { my @columns = split /\|/, $line; push @array1, $columns[1]; # Note the first element [0] is empty push @array2, $columns[2]; push @array3, $columns[3]; } __DATA__ |0|PA|1|||BELL|FRANCIS|D|||1||ANGORA||FLEET|HAMPSHIRE|GU51 2UA|