Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    
    ...
        ($a=rand($.)) < $k and ($lines[$a] = $_);
    }
    print @lines;
    
  2. or download this
    $ seq 4 20 | ./rand.pl 8
    19
    ...
    9
    15
    11