Help for this page

Select Code to Download


  1. or download this
    my $len=length($my_astr);
    $c1 = substr($my_astr, $p1 = int rand($len), 1);
    $c2 = substr($my_astr, $p2 = int rand($len), 1);
    
  2. or download this
    $p1 = int rand(length($my_astr));
    $p2 = int rand(length($my_astr));
    substr($my_astr, $p1, 1, substr($my_astr, $p2, 1));
    substr($my_astr, $p2, 1, substr($my_astr, $p1, 1));