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;
        ...