foreach my $line ( @file ) { my @fields = split(/\s+/, $line); print "$fields[2]\n"; }