while (<>) [ my $second_token = ( split " " )[1]; # do something with the second token... }