Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Subroutine References

by tcf22 (Priest)
on Dec 07, 2003 at 22:35 UTC ( #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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://312982]
[huck]: a first for me, got someone at credit card services to give me their credit card number!!

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2017-03-24 19:20 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (306 votes). Check out past polls.