in reply to strings->can->isa but numbers->can't?

Strings are simply interpreted as package names when you call a method on them. This is how Foo->new works in the first place.

There is no such provision for numbers, arrays, hashes or subroutines.

Replies are listed 'Best First'.
Re^2: strings->can->isa but numbers->can't?
by djerius (Beadle) on Apr 26, 2012 at 17:37 UTC
    Strings are simply interpreted as package names when you call a method on them. This is how Foo->new works in the first place.

    D'oh! Of course! I even use that behavior on occasion.

    Thanks for the reminder.