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