Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Comparing Lines within a Word List

by graff (Chancellor)
on Apr 27, 2016 at 10:07 UTC ( [id://1161620]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        my $model = shift @words;
        my $regex = join( "", map{ ( /[rs]/ ) ? "[rs]" : $_ } split( /([rs
    +])/, $model ));
        next if ( $regex eq $model );  # skip if model has no "r" or "s"
        my @hits = grep /^$regex$/, @words;
        ...
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (None)
    As of 2024-04-18 23:42 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found