<p dir="ltr">if (my @cap = /$regex/) {<br>
@cap = ($&) unless defined $1;<br>
foreach @cap {<br>
do something;<br>
}<br>
}</p>
<div class="gmail_quote">On May 10, 2013 4:47 PM, "Quantum Mechanic" <<a href="mailto:quantum.mechanic.1964@gmail.com">quantum.mechanic.1964@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF"><div><br></div><blockquote type="cite"><div><div class="gmail_quote">On Fri, May 10, 2013 at 1:33 PM, Quantum Mechanic <span dir="ltr"><<a href="mailto:quantum.mechanic.1964@gmail.com" target="_blank">quantum.mechanic.1964@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I would have tried "my" instead of the punctuation variables:<br>
<br>
if (my @capture = /$regex/) {<br>
foreach @capture {<br>
do something;<br>
}<br>
}<br></blockquote><div><br>That doesn't make any difference, @capture still (seems to get) the 1/true result code<br>when there is no capturing.</div></div></div></blockquote><div><br></div><br><blockquote type="cite">
<div><div class="gmail_quote"><div>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.</div></div>
</div></blockquote></div><br>_______________________________________________<br>
toronto-pm mailing list<br>
<a href="mailto:toronto-pm@pm.org">toronto-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/toronto-pm" target="_blank">http://mail.pm.org/mailman/listinfo/toronto-pm</a><br>
<br></blockquote></div>