in reply to Re: perl 5.8.8 equivalent of ?|
in thread perl 5.8.8 equivalent of ?|

Using $+ only works with one capture per alternation, though.  In other words, it's not a general substitute for (?|...).

Replies are listed 'Best First'.
Re^3: perl 5.8.8 equivalent of ?|
by ambrus (Abbot) on Dec 13, 2010 at 09:38 UTC

    True. The general substitute (even more general than /(?| is) is named captures, but sadly those too aren't available in perl 5.8.8; or the defined-or operator like $1//$2, which too isn't in perl 5.8.8.