Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Stumped when passing barewords

by halley (Prior)
on Apr 22, 2004 at 13:31 UTC ( #347349=note: print w/replies, xml ) Need Help??


in reply to Stumped when passing barewords

I'm surprised you're not getting the dreaded "prototype too late" warning. That may be the real bug here.
use strict; use warnings; foo(2,3,4); sub foo($$$) { print "@_", $/ } __OUTPUT__ main::foo() called too early to check prototype at - line 3. 2 3 4

--
[ e d @ h a l l e y . c c ]

Replies are listed 'Best First'.
Re: Re: Stumped when passing barewords
by broquaint (Abbot) on Apr 22, 2004 at 13:53 UTC
    This is because in your example the call to foo can be discerned at compile-time, whereas subroutine calls within other subroutines can't due to perl's dynamic nature, hence the lack of use strict 'subs must exist'.
    HTH

    _________
    broquaint

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://347349]
help
Chatterbox?
[duyet]: Oh, seems like LanX' team has won the fourth World Cup ... awesome!

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2016-12-10 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (160 votes). Check out past polls.