Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

check if a word can be create from a random string

by Zambozo
on Nov 30, 2012 at 16:20 UTC ( #1006491=perlquestion: print w/replies, xml ) Need Help??
Zambozo has asked for the wisdom of the Perl Monks concerning the following question:

1.Output 8 randomly generated characters and ask user if the letters are acceptable 2.Input word 3.Check word can be made from the 8 randomly generated characters (make sure letters only used once in the randomly generated word are only used once in the entered word)

Hi I have done task 1 and task 2 but i have trouble doing the final task3.I need to take the random string and the input put them into array(spilt) this is done but how to check if a shift element is in the other array ? I am trying to loop but I can do it. And I am using grep to find if there is a match right ? I can't use ~~ because I am on 5.8.8 Thank you hope I did not messed up

  • Comment on check if a word can be create from a random string

Replies are listed 'Best First'.
Re: check if a word can be create from a random string
by choroba (Bishop) on Nov 30, 2012 at 16:30 UTC
Re: check
by dsheroh (Prior) on Dec 01, 2012 at 10:19 UTC
    Please don't delete or remove the content of questions after they've been answered. Someone else might have the same question in the future and removing it deprives them of the ability to do a search and find the answers you got without having to wait for it to be answered again.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1006491]
[marto]: pointing out the advantages of cpan modules is well worth in, as both developer and $client/$company benefit greatly
[Tux]: $src =~ m{^(.*),(.*)$/ and $2 !~ $valid and $src = $1;
[Tux]: s,/,},

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2018-05-27 10:51 GMT
Find Nodes?
    Voting Booth?