- or download this
#!/usr/bin/perl -w --
use strict;
# Usage: ./Pattern [n [string]]
- or download this
my $depth = shift || 2;
my $string = shift || "helloworldhellohellohihellohiworld";
$string =~ s/[\000-\037\0177]/ /g; # strip non-printable
- or download this
# seed dictionary with printable characters...
my %dict = map {(chr$_ => 0)} '32'..'126';
...
}
}
- or download this
# the following sort routine is arbitrary,
# chosen because it behaves the way I want... sort of.
...
#print Dumper(\%dict);
__END__
- 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