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.