in reply to Re: Difficulty in randomization
in thread Difficulty in randomization
Same thing without the array:
my $joined_string = '-' x 600; foreach ( 1 .. 10 ) { my $i = int rand 600; redo if 'X' eq substr $joined_string, $i, 1; substr $joined_string, $i, 1, 'X'; }
|
|---|