>I've very rarely found cases where ?? was useful and // didn't work, and
>never in regular code.
>From the Camel:
The C<??> operator is most useful when an ordinary pattern match
would find the last rather than the first occurrence:
open DICT, "/usr/dict/words" or die "Can't open words: $!\n";
while (<DICT>) {
$first = $1 if ?(^neur.*)?;
$last = $1 if /(^neur.*)/;
}
print $first,"\n"; # prints "neurad"
print $last,"\n"; # prints "neurypnology"
Nothing a SMOP can't address, but for one liners at the least, the
S part would seem to preclude the P part. (Same for the -l line-mode
flag.)
--tom