Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Memory Use and/or efficiency passing scalars to subs

by Elian (Parson)
on Sep 01, 2003 at 16:56 UTC ( #288163=note: print w/replies, xml ) Need Help??


in reply to Memory Use and/or efficiency passing scalars to subs

If you really, really, really want named aliases without making copies or playing games with modules, then do so. Make your sub look like:
sub foo { foreach my $arg1 ($_[0]) { foreach my $arg2 ($_[1]) { foreach my $arg3 ($_[2]) { # insert your code here which uses arg1, arg2, and arg3 } } } }
Not, mind, that'd I'd recommend, nor even suggest that, but...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2021-07-23 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?