Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Comparing Lines within a Word List

by graff (Chancellor)
on Apr 27, 2016 at 10:07 UTC ( #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
Node Status?
node history
Node Type: note [id://1161620]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2021-04-11 01:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?