Hi Monks,
I'm in the process of writing a script that generates 8 Random Characters and the user has to make words from these characters. Each character can only be used once. For example, if the random sequence is FOTBIEIW and the user enters FOOT it will show an error message "No match". If the sequence was FOTBOIEW then FOOT would be acceptable.
To generate the random letters im using:
my @letter=('A'..'Z');
@rand='';
foreach(0..7){
$rand.=$letter[rand(@letter)];
Then I get the user to enter a word split it into an array.
This is where I get stuck.
for($count=0; $count<= ($wordLength - 1); $count++){
if($wordArray[$count] =~ /[$rand]/o{
Original content restored by GrandFather