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

Re^5: hash and array

by ihb (Deacon)
on May 23, 2005 at 00:02 UTC ( #459406=note: print w/replies, xml ) Need Help??


in reply to Re^4: hash and array
in thread hash and array

%hash{$_}++ for @array

I'd expect it to be more like map instead of for, so that you can do

@old = %hash{@keys} >>++;
but I'm 100% guessing.

ihb

See perltoc if you don't know which perldoc to read!

Replies are listed 'Best First'.
Re^6: hash and array
by mrborisguy (Hermit) on May 23, 2005 at 00:12 UTC

    You know what, I can't even say. I was going to try it out, see what it did, but I can't even get:

    %hash{ @keys } >>++;

    to run, much less

    @old = %hash{ @keys } >>++;

    So I don't know what the deal is. I'm running Pugs, and I updated it from svn just today, so maybe they just haven't implimented it yet. I'm pretty sure I was there when japhy asked the question on #perl6, so I'm fairly confident the syntax must be right. What I'm trying to say, I guess, is that I just don't know enough to answer your question! (Man, I hate when that happens!)

    -Bryan

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://459406]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2020-10-23 11:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (238 votes). Check out past polls.

    Notices?