perl -we'use strict;use P; my $re = qr{ (?x) (\w+) }; my $dat = "Just another cats meow"; my @matches = $dat =~ $re; P "#matches=%s, matches=%s", scalar(@matches), \@matches; exit scalar(@matches);' #matches=1, matches=["another"]