in reply to Parsing in perl

@le_data contains the lines of the file (which is a total waste of memory, incidentally). @line contains the fields. You never use contents of @line.

Also, your indexes make no sense. The fields are indexed 0 to 4, but you're accessing index 6.

use strict; use warnings; my $width = 11; my $le = "lethal_results.txt"; open(LE , "<", $le) or die("Unable to open file $le: $!\n"); while (<LE>) { chomp; my @line = split(/\s+/, $_); if ($line[4] >= 50) { printf("%s%${width}s%${width}s%\t\t%.6g\n", @line[0,1,2,4] ); } }