Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: rtfm moment...

by turnstep (Parson)
on Mar 08, 2001 at 21:54 UTC ( [id://63029]=note: print w/replies, xml ) Need Help??


in reply to rtfm moment...

You know, if you had said...
&dump(-file=>"foo.txt", -code=>"full", -blah=>"etc");

...your script would have worked just fine. Yet another reason to use the unloved ampersand in front of a subroutine call. :)

Hrmm, should perl -w say something when you make a pseudo-ambiguous call to a built-in function? Probably not: that's why I always use the ampersand to disambiguate things.

(Of course, sometimes you *want* function calls to appear a bit ambiguous :)

Replies are listed 'Best First'.
(tye)Re: rtfm moment...
by tye (Sage) on Mar 08, 2001 at 22:22 UTC

    Actually, I think much better advice is to view this as a good reason to always use mixed case in your subroutine names!

    When the "style" shifted from &sub() [Perl4] to just sub() [Perl5], I don't think the documentation and warnings caught up with the problems that resulted. There are probably some warnings that should be added, like you noted, and some advice that needs to be updated and strenthened in the docs.

            - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-18 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found