Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Subroutine References

by tcf22 (Priest)
on Dec 07, 2003 at 22:35 UTC ( [id://312982]=note: print w/replies, xml ) Need Help??


in reply to Subroutine References

What I think you are asking is why my $SubRef = sub ($$){...}

Lets you call it with an array ref like

$SubRef->(\@Array , $Scalar);

And I believe the answer is that an array ref is actually scalar, so the prototyping allows it whether it is sub(\@$) or sub($$)


UPDATE: I was wrong. Just ignore me.

- Tom

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-24 00:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found