SPUG: Attaching a string to STDOUT

Jack Foy jack at gehennom.net
Mon Apr 19 23:04:57 CDT 2004

I'd like to override STDOUT so that 'print' and friends append to a
string, rather than writing to a physical file.  How may I do this?  Any
help is appreciated.

(Background: I have a large and complex gawk script (a Cobol data type
translator -- not my code, thank goodness).  I need to integrate its
functionality into my Perl environment, preferably without having to
understand the gawk code in depth.  I've run it through a2p, and now I'm
trying to encapsulate the resulting Perl into a module.  Simpler
solutions are rendered impractical by our weird platform.)  

Jack Foy <jack at gehennom.net>

More information about the spug-list mailing list