in reply to Nested grouping or capturing inside capturing
$+ helps a little:
#print "$1-$2-".($4 || $3) if /(\w+)\s(\w+)\s("([^"]+)"|(\w+))/; print "$1-$2-$+" if /(\w+)\s(\w+)\s("([^"]+)"|(\w+))/;
In Section
Seekers of Perl Wisdom
in reply to Nested grouping or capturing inside capturing
$+ helps a little:
#print "$1-$2-".($4 || $3) if /(\w+)\s(\w+)\s("([^"]+)"|(\w+))/; print "$1-$2-$+" if /(\w+)\s(\w+)\s("([^"]+)"|(\w+))/;