Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: using a sub routing as an argument

by broquaint (Abbot)
on Jun 23, 2004 at 02:36 UTC ( [id://368926]=note: print w/replies, xml ) Need Help??


in reply to using a sub routing as an argument

This is a perfect opportunity to take advantage of can e.g
&$_ for map { __PACKAGE__->can($_) || () } @ARGV;
That map provides the for with a list of subroutines that exist in the current package whose names correspond to the values in @ARGV.
HTH

_________
broquaint

Log In?
Username:
Password:

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

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

    No recent polls found