Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: One line assigment statement with regex match

by mugwumpjism (Hermit)
on Jun 23, 2005 at 00:44 UTC ( #469254=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      my $re = qr/(?:${\(
                     join "|", map { qr/\Q$_\E/ } @terms
    ...
      ...
    
      my ($match) = ($line =~ m/($re)/);
    
  2. or download this
    $h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/."
    ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2020-05-25 15:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (146 votes). Check out past polls.

    Notices?