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

And Now For Something Completely Different... Re: Pattern Finding

by Zaxo (Archbishop)
on Sep 11, 2001 at 17:29 UTC ( #111746=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w --
    use strict;
    
    # Usage: ./Pattern [n [string]]
    
  2. or download this
    my $depth = shift || 2;
    my $string = shift || "helloworldhellohellohihellohiworld";
    $string =~ s/[\000-\037\0177]/ /g; # strip non-printable
    
  3. or download this
    # seed dictionary with printable characters...
    my %dict = map {(chr$_ => 0)} '32'..'126';
    ...
        }
    }
    
  4. or download this
    # the following sort routine is arbitrary,
    # chosen because it behaves the way I want... sort of.
    ...
    #print Dumper(\%dict);
    
    __END__
    
  5. or download this
    ow ohi llo worl dh ldh orl rld hellohi hi hellow lohi iwo ihe ell ld h
    +e ll lo iw rl oh ih el or wo hel wor loh hell helloh hello
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://111746]
help
Chatterbox?
[LanX]: ...
[sierpinski]: test passed?
[sierpinski]: It's really weird seeing that I have 20 votes now.. I've been at 18 for so long
[LanX]: yes, test passed :)
[sierpinski]: woo hoo! you can go home for the day now
[Eily]: does this mean you'll give up the random prefix solution LanX?

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2017-03-28 12:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (331 votes). Check out past polls.