<br><div class="gmail_quote">On Mon, Sep 26, 2011 at 3:41 PM, Francisco Obispo <span dir="ltr"><<a href="mailto:fobispo@isc.org">fobispo@isc.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

And if the process is running continuously and matching several of these, you might want to:<br>
<br>
my $patterm= qr/Thank you for your order:\s*(\d+)/;<br>
<br>
if ($text =~ m/$patterm/){<br>
        my $order_num=$1;<br>
        # do stuff with $order_num<br>
<br>
}<br></blockquote><div><br>I don't think that improves performance or readability- the reg exp would be compiled once at load time either way.<br></div></div>