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

Re: Scalar context changes bareword value?

by crenz (Priest)
on Apr 22, 2004 at 13:35 UTC ( #347350=note: print w/ replies, xml ) Need Help??


in reply to Re: Scalar context changes bareword value?
in thread Stumped when passing barewords

Thanks for the explanation! I can just pass $_[0] in this situation, which should make it work. However, if there would be multiple parameters and I wanted to pass @_ as a whole, there'd be a problem :(.


Comment on Re: Scalar context changes bareword value?
Select or Download Code
Re: Re: Scalar context changes bareword value?
by Fletch (Chancellor) on Apr 22, 2004 at 13:45 UTC

    Well, not a problem but you'd have to call it as sub2( $_[0]  => @_[1..$#_] ). Then again, you play with prototypes you're going to get burned. Or was that matches . . .

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-08-23 17:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (175 votes), past polls