Mike Schilli's Friendly Neighborhood Perl Shop

Home
USArundbrief.com
Resume
CPAN Modules
Articles in English
Articles in German
Mike's Script Archive
English-Japanese Translation Trainer
Adventures with O'Reilly's Safari
10 Easy Steps to Become a California Driver
Unofficial perlmonks.com IRC Channel
My Collection of Outage Pages
Prisma (Computer Club Deutschland)
Mike's Monologues
Mike's Script Archive: tieexample

tieexample - Example on how to tie STDIN and STDOUT


NAME

tieexample - Example on how to tie STDIN and STDOUT


DOWNLOAD

tieexample


SYNOPSIS

    tieexample


DESCRIPTION

tie_stdinout is a sample program showing how to tie STDIN and STDOUT to buffers. After the tie, every print "string" appends to an internal buffer, while every while(<STDIN>) reads from the another buffer.

This way we can teach functions/libraries that just know how to read from STDIN and write to STDOUT how to process strings.


CREDITS

Many thanks to Michael Renner for contributing a patch to cope with arbitrary values of the input record separator $/.


AUTHOR

2002, Mike Schilli <m@perlmeister.com>


Latest update: 20-Oct-2013