[oak perl] The Nondeterministic Yodapproximator
Tony Monroe
tony at nog.net
Fri Sep 12 11:08:17 CDT 2003
[Re-sending my reply to the entire list, instead of just Belden.
Stress, bad for the brain, you know.]
Meditate ye upon the words of Belden Lyman:
>
> c'mon, show us the code! At a guess:
>
> #fisher_yates shuffle is Cookbook recipe 4.17
> print join ' ', fisher_yates( split /([^'\w]+)/, $sentence ) ;
>
> Close? :)
I wrote this before I knew about the Perl Cookbook, so it uses a
custom algorithm. If the algorithm resembles Fisher-Yates, it's
entirely coincidental. And no, it doesn't use Parse::RecDescent.
For those of you not at Tuesday's meeting, I sent this link out
because I mentioned the script as part of how I learned Perl.
(Lesson 1: Stupid Text Tricks with Perl 4.)
-- tony
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/oakland/attachments/20030912/6233fd78/attachment.bin
More information about the Oakland
mailing list