in reply to overriding print built-in

While you can't override print, you may be able to achieve your desired result using a tie instead.

For example, Sprog uses this module to translate code like this ...

print @args;

... into code like this ...

$some_object->print(@args);

Replies are listed 'Best First'.
Re^2: overriding print built-in
by Fletch (Bishop) on Apr 12, 2006 at 03:08 UTC

    Specifically you're going to be interested in the TIEHANDLE and related routines from perltie; and perhaps IO::Scalar or the like for inspiration.

Re^2: overriding print built-in
by jeremyh (Beadle) on Apr 13, 2006 at 17:12 UTC
    Thank you, this looks like it will work for what I want to do, which is to make a custom output formatting function send output from one server to another over an Oracle DB link, without touching the code of the custom output function.

    Thanks again,

    Jeremy