[tpm] problems with what regex returns ... in context ?

Quantum Mechanic quantum.mechanic.1964 at gmail.com
Fri May 10 13:47:13 PDT 2013


> On Fri, May 10, 2013 at 1:33 PM, Quantum Mechanic <quantum.mechanic.1964 at gmail.com> wrote:
> I would have tried "my" instead of the punctuation variables:
> 
> if (my @capture = /$regex/) {
>     foreach @capture {
>         do something;
>     }
> }
> 
> That doesn't make any difference, @capture still (seems to get) the 1/true result code
> when there is no capturing.


> It should create a new @capture each time. It doesn't always capture something, right? I'll have to try it when I get home.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20130510/561738c4/attachment.html>


More information about the toronto-pm mailing list