Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by AnomalousMonk (Archbishop)
on Feb 12, 2013 at 18:12 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1018422]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-19 16:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found