Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Creating a hash with key generated by a sub?

by smullis (Pilgrim)
on Nov 12, 2004 at 13:21 UTC ( #407347=note: print w/replies, xml ) Need Help??


in reply to Re: Creating a hash with key generated by a sub?
in thread Creating a hash with key generated by a sub?

Thanks for this steves...

One point of interest - I thought that $_ was implicitly passed to map?
The %blah = (map {&get_md5, $_} @array); worked for me fine...

Cheers,

SM

Replies are listed 'Best First'.
Re^3: Creating a hash with key generated by a sub?
by steves (Curate) on Nov 12, 2004 at 13:27 UTC

    I should clarify: In other places, get_md5() is passed with one argument, which I assumed you wanted concatenated to $secret to make the key. The way map was originally set up, it was not passing anything to get_md5() -- it was calling it with no arguments and using $_ as the hash value. Unless I'm missing something ...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://407347]
help
Chatterbox?
choroba recommends Paludan BogCafe, if it still exists
[karlgoethebier]: choroba: This: https://www. paludan-cafe.dk ???
[karlgoethebier]: I get "You are using an outdated version of Internet Explorer. For a faster, safer browsing experienceUpgrade" Ouch! i got safari...
[karlgoethebier]: ...well, outdated

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2017-11-19 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (280 votes). Check out past polls.

    Notices?