Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: string/array smart match regex failing me

by hsinclai (Deacon)
on Jan 05, 2011 at 21:10 UTC ( [id://880678]=note: print w/replies, xml ) Need Help??


in reply to Re: string/array smart match regex failing me
in thread string/array smart match regex failing me

Same here, it worked on both of: 5.12.2 on fedora 14 and 5.10.1 on another linux

use strict; use warnings; use 5.010; my $string = q(quux); my @patterns = map { qr/$_/i } qw( foo ba(r|z) quux ); say @patterns; if( $string ~~ @patterns ) { #say q(matched); say qq(This matched: $&); }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://880678]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-19 12:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found