while () { chomp; my ($first, $second, $third, $fourth) = split /\+|\s/; # do stuff }