All pastes #497760 Raw Edit

Something

public text v1 · immutable
·published 2007-05-20 01:42 UTC
rendered paste body
#!/usr/bin/perl

my $chars = "UDFBLR2'";
my ($result,$b,$rand);
my $a = 6;
my @check = (1,0,3,2,5,4);
for (my $i; $i < 20000; $i++) {
  $rand = int(rand(6));
  while ($rand == $a || ($rand == $b && $check[$rand] == $a)) { $rand = int(rand(6));  }
  $b = $a;
  $a = $rand;
  $result .= substr($chars,$rand,1);
  $rand = int(rand(3));
  if ($rand) { $result .= substr($chars,$rand+5,1); }
  $result .= " ";
}
print "$result\n";