Update1:
- You'll have to download this and run it from a file
- Run it more than once to get the full effect
- Save output to a file and print for best results
Update2: fixed platform dependent bug noticed by stefan k
#!/usr/bin/perl -w # find-a-func
use strict;
$_='$;="per
l";map{map {s}^\s+}}
;$_{$_}++unless(/[^a-
z]/)}split(/
[\s,]+/)i
f(/alpha.
*$;/i../w
ait/)}`$;
doc\040$;
toc`;;;@[=k
eys%_;$; =20;$:=15;;for(0..($;*$:-1 )){$;[$_]="_"
;}until($%++>3*$;||@]>2*$:-3){@_=split(//,splice(@[,rand(
@[),1));if(3>@_){next;}$~=int(rand($;));$^=int(rand($:));
$-=$~+$^*$;;my$Erudil=0;{if($Erudil++>2*$:){next;}$a=(-1,
0,1)[rand(3)];$b=(-1,0,1)[rand(3)];unless(($a||$b)&&$~
+$a*@_<=$;&&$~+$a*@_>=0&&$^+$b*@_<=$:&&$^+$b*@_>=0){re
do;;}my$llama=0;;for(0..$#_){unless($;[$-+$a*$_+$b*
$;*$_]eq$_[$_]||$;[$-+$a*$_+$b*$;*$_]eq"_"){$llam
a++;last;}}if($llama){redo;}push@],join("",@_);f
or(0..$#_){$;[$-+$a*$_+$b*$;*$_]=$_[$_];}}}@_
=sort@];unshift@_ ,"Find:","-"x5;for$a(0.
.$:-1){for$b(0. .$;-1){$~=("a".."z")
[rand(26)];$_ ="$;[$a*$;+$b]".
$";s;_;$~; ;print;}$_=s
hift@_|| $";;print$
",$", $_,$ /;$_
=shi ft@_ ||$
";pr int $"x
$;, $"x $;,
$", $", $_
,$/;; ;}' ;;;
s[\s+] $$g; eval;
__DATA__
The use of the llama image in association with Perl is a trademark
of O'Reilly & Associates, Inc. Used with permission.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|