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
In Section
Seekers of Perl Wisdom