in reply to Sub on the fly?

Yes, usually with something like *foo = sub { ... };

Replies are listed 'Best First'.
Re^2: Sub on the fly?
by stvn (Monsignor) on Aug 17, 2006 at 12:14 UTC

    However, that would only work if you were within the blork package, so if you wanted to install the method from main:: then this *blork::foo = sub { ... } is more approriate.

    -stvn
      Well, assuming that most of these things will happen dynamically, I'll raise yours by
      { no strict 'refs'; *{ $class . '::' . $name } = sub { ... }; }
      *scnr* Update: As you already did below. *slaps-self*

      Ordinary morality is for ordinary people. -- Aleister Crowley