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 ''; }
In reply to Re: ASCII Stereograms (SIRTS)
by hossman
in thread ASCII Stereograms (SIRTS)
by abstracts
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |