use Text::ParseWords; $str = "a b c"; @f = split /\t/, $str; print scalar @f, "\n"; @f = parse_line('\t', 0, $str); print scalar @f, "\n";