http://qs1969.pair.com?node_id=569814


in reply to Why is file being slurped in instead of line by line?

Hello ,

To make your code works fine ,

1. remove "undef $/;" line ... which makes the whloe data as one line ( removes line sperator )

2. remove "my @data;" from the top ... and declare it inside the loop ... which means ... it re-assigned a new data for each loop like

my @data = split (/\t/, $line);

HTH