in reply to ASCII Stereograms (SIRTS)
This can happen becuase the rs method has (unfortunately) just happened to pick some random characters that are allready part of the pattern for the current line. (In fact, I think the camel SIRTS that was posted has this problem with the legs).
You can prevent ths from happening by making two minor changes:
sub rs{ my @chars = map chr, 33..126; # all printable chars if (defined $p) { # don't use anything allready in our pattern @chars = grep index($p,$_)==-1, @chars; } my $r; $r .= $chars[rand @chars] for 1 .. shift; $r or ''; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: ASCII Stereograms (SIRTS)
by abstracts (Hermit) on Dec 25, 2001 at 15:18 UTC |