Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Splitting strings into words when there are no separators

by japhy (Canon)
on Sep 14, 2005 at 16:16 UTC ( [id://491916]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub mk_fuzzy {
      our ($m, $i, $d) = splice @_, 0, 3;
    ...
        (?{ [ [$m-$^R->[2], $m], [$i-$^R->[0], $i], [$d-$^R->[1], $d] ] })
      }x;
    }
    
  2. or download this
    my $test = mk_fuzzy(
      1, # max number of modifications to allow
    ...
        print "$word isn't enough like 'perl'\n";
      }
    }
    
  3. or download this
    my $test = mk_fuzzy(
      1, # max number of modifications to allow
    ...
        print "$word isn't enough like 'perl'\n";
      }
    }
    
  4. or download this
    if ($word =~ $test) {
      my ($m_used, $m_allowed) = @{ $^R->[0] };
    ...
      my ($d_used, $d_allowed) = @{ $^R->[2] };
      print "Using $m_used mods, $i_used inserts, and $d_used dels, $word 
    +matched\n";
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-26 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found