Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

regex with arrays and variables

by xorl (Deacon)
on Apr 25, 2013 at 17:52 UTC ( #1030711=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    
    }
    
  2. or download this
    my $regex = "(";
    foreach (@array2) {
      $regex .= $_ . "|";
    }
    $regex .= ")";
    
  3. or download this
    if ($i =~ m/$regex/) {
    
  4. or download this
    #!/usr/bin/perl
    
    ...
    # Do something with $i now.
    
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2015-08-01 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (285 votes), past polls