[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] RFC



#!perl -w

# Request for comments...  -Sneex-  :]
# Small mod to something I seen RS write.

$sindex = chr(64 + (localtime)[3]);
$eindex = ((ord($sindex) + 9) < 91) ?
              chr(ord($sindex) + 9) :
              chr(((ord($sindex) + 9) - 90) + 64);

for (($ARGV[0]..$ARGV[1]) || 0) {
  my @num = ($sindex..$eindex);
  for (my $i = $#num; $i > 0; $i--) {
    my $swapper = int rand(1+$i);
    if ($swapper < $i) {
      @num[$i,$swapper] = @num[$swapper,$i];
    }
  }
  print "@num\n";
}

__END__

???
-Sneex-  :]
- FCCJ * 501 W State St * Jacksonville, Fl 32202 * 904/632-3089 -


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe