Help for this page

Select Code to Download


  1. or download this
    sub rndStr{ join'', @_[ map{ rand @_ } 1 .. shift ] }
    
  2. or download this
    sub rndStr{ 
        my( $n, @chars ) = @_;
        return join'', @chars[ map{ int rand @chars } 1 .. $n ];
    }
    
  3. or download this
    local $/;
    my @chars = map chr, 0 .. 255;;
    print rndStr 1024, @chars  for 1 .. 2**20;;