Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: assigning arrays as values to keys of hash

by AnomalousMonk (Chancellor)
on Sep 18, 2018 at 23:17 UTC ( #1222617=note: print w/replies, xml ) Need Help??


in reply to Re: assigning arrays as values to keys of hash
in thread assigning arrays as values to keys of hash

@{$hash{$_}} = uniq @{$hash{$_}} for keys %hash;

I think
    @$_ = uniq @$_ for values %hash;
is more concise and even easier to read :)


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2019-07-17 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?