in reply to How to capture quantified repeats?

You may have better luck changing the code to:
my $ham = "spam\tspam\tspam\t\tyam\tclam"; my @jam = ($ham =~ (m/^[^\t]+\t[^\t]+\t([^\t]+)(\t\t)([^\t]+)\t[^\t]+$ +/)); print join("\n", '**', @jam, '**', '');
prints:
** spam yam **

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.