in reply to Re (5): input switch
in thread input switch

There's no early binding in Perl. All method calls are symbolic lookups at run time. That means the if elsif method does a dispatch as well as a string comparison. Which is what I already said in my first reply on this thread branch.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re(7): input switch
by RatArsed (Monk) on Sep 09, 2002 at 13:29 UTC
    Oops, my bad, I didn't see that.

    does seem a bit counter intuative to use a late binding method when you already know the method name. I could defned my solution in so much that if it is implemented in the future, then you automatically get the benefits it brings...

    --
    RatArsed

      Seems counterintuitive, doesn't it? Unfortunately early binding simply isn't possible in Perl since a) you can add symbols to a package at runtime (think AUTOLOAD tricks) and b) @ISA can be modified anytime. Perl is in general a very highly dynamic language, but that comes at a price..

      Makeshifts last the longest.