Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: One line assigment statement with regex match

by GrandFather (Sage)
on Jun 22, 2005 at 21:42 UTC ( #469211=note: print w/replies, xml ) Need Help??


in reply to One line assigment statement with regex match

something like:

@terms = ("Word1","Word2","Word3"); $match = $1 if join (" ", @terms) =~ /((?:^| )$lineFromSomeTextFile(?: + |$))/;

Perl is Huffman encoded by design.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2020-05-31 11:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?