Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Conditional module use

by Nkuvu (Priest)
on Apr 21, 2006 at 21:18 UTC ( [id://544986]=note: print w/replies, xml ) Need Help??


in reply to Re: Conditional module use
in thread Conditional module use

That works perfectly, thank you.

But I'm a little unclear on the reason. What's the difference between a subroutine and a method in Perl?

Replies are listed 'Best First'.
Re^3: Conditional module use
by chromatic (Archbishop) on Apr 21, 2006 at 21:37 UTC

    I don't know what gaal was thinking, but that's not it. The problem is that Term::ReadKey::ReadMode in Term::ReadKey::ReadMode 2; is a bareword unless you load Term::ReadKey. With strict enabled, Perl gives a warning instead of trying to disambiguate what you meant.

    For this reason, a lot of people recommend always using parentheses around all subroutine and method call arguments.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2024-04-24 13:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found