Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Dropping the ampersand

by kyle (Abbot)
on Feb 09, 2007 at 20:54 UTC ( #599281=note: print w/replies, xml ) Need Help??


in reply to Dropping the ampersand

I can't tell whether this affects you without seeing the rest of your code, but there's a small difference between &foo and foo(). Specifically, &foo will get the current contents of @_ while foo() will not. If Con::liveones is expecting that, then that may be your problem.

bar( qw( testing is fun ) ); sub bar { &foo; foo(); &foo(); foo( 'woohoo' ); } sub foo { print 'foo: '; print join q{,}, map { "[$_]" } @_; print "\n"; }

Outputs:

foo: [testing],[is],[fun] foo: foo: foo: [woohoo]

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2022-01-27 06:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (70 votes). Check out past polls.

    Notices?