Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: prototypes parens/parenthesis hash initialization/declaration / Too many arguments for / $$

by AnomalousMonk (Monsignor)
on Feb 12, 2013 at 18:12 UTC ( #1018422=note: print w/ replies, xml ) Need Help??


in reply to prototypes parens/parenthesis hash initialization/declaration / Too many arguments for / $$

Why not try a different approach?

>perl -wMstrict -MData::Dump -le "sub ff { return map { $_ => join ' ', m{ \d }xmsg } map { m{ \A \d{2} \z }xms ? $_ : die qq{bad arg: '$_'} } @_; } ;; my %f = ff(12, 34); dd \%f; " { 12 => "1 2", 34 => "3 4" }


Comment on Re: prototypes parens/parenthesis hash initialization/declaration / Too many arguments for / $$
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2014-07-13 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (251 votes), past polls