Brent Clark wrote:
> Hi list

Hello,

> I have im trying to enhance my regex skill.
> 
> My questions is, would
> 
> m/^p11[016]/io
> 
> match like
> 
> m/^(p110|p111|p116)/io   
> 
> Any tips or advice, would greatfully be appreciated.

It appears that they would both match the same string although I would think
that the second example would be slower and less efficient as using
alternation as well as capturing parentheses is usually slower.  If in doubt,
use the Benchmark module to test your assumptions.



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to