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

Re^2: Spotting an empty array as argument

by LanX (Sage)
on Mar 26, 2021 at 12:22 UTC ( #11130378=note: print w/replies, xml ) Need Help??


in reply to Re: Spotting an empty array as argument
in thread Spotting an empty array as argument

Yours will only allow one scalar argument and see Re^4: Spotting an empty array as argument (prototype _ ) for context :/

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re^2: Spotting an empty array as argument

Replies are listed 'Best First'.
Re^3: Spotting an empty array as argument
by tobyink (Canon) on Mar 26, 2021 at 13:13 UTC
      As it circumvents prototypes, it doesn't use $_ when no arguments are specified.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2021-12-05 15:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (31 votes). Check out past polls.

    Notices?