Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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 (Chancellor) 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]
[Discipulus]: with eskimo greeting is a little bit impressing, anyway
[Eily]: I actually used the eskimo greeting :P, I just wrote the "canonical" form of the oneliner here
[Discipulus]: next time you can add `SARGV-1` and if still not impressed pass a 'rm -f..' as last arg
[Eily]: :)
[Eily]: or I might be tempted to send him an Acme::EyeDropsed file next time
[Eily]: Acme::Bleach is tempting, but it will look like I'm just using the one module that does precisely exactly what he wants

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2017-04-26 15:10 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (482 votes). Check out past polls.