Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Comparing string to array elements

by LanX (Saint)
on Jan 11, 2017 at 18:17 UTC ( [id://1179414]=note: print w/replies, xml ) Need Help??


in reply to Comparing string to array elements

tested
@terms = qw/.A. .C./; my $clause= join "|", map quotemeta ,@terms; while (my $line = <DATA>){ print $1 while $line =~m/UP($clause)LB/g; } __DATA__ UP.A.LB UP.B.LB UP.C.LB

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-03-29 02:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found