Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^5: hash and array

by ihb (Deacon)
on May 23, 2005 at 00:02 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://459406]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-18 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found