You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

14 lines
237 B

  1. #!/usr/bin/perl
  2. srand(1337);
  3. # constant bits, the rest are filled with random data
  4. $bits = $ARGV[0] || 10;
  5. $rem = 16 - $bits;
  6. for ($i = 0; $i < 2**$bits; $i++)
  7. {
  8. $out = $i * 2**$rem + int(rand(2**$rem));
  9. print $out . ",\n";
  10. }