chomp $line; my @items_in_line = split ' ', $line; # access the second item: print $items_in_line[1], "\n";