% ./buff1.pl | ./buff2.pl (out of memory) #### #!/usr/bin/perl use strict; use FileHandle; my $tslast = ""; while( 1 == 1 ) { my $timestamp = time(); if( $timestamp ne $tslast ) { my $ofh = select STDOUT; $| = 1; select $ofh; $ofh->autoflush(1); print STDOUT $timestamp . "\n"; $tslast = $timestamp; } } #### #!/usr/bin/perl use FileHandle; foreach my $line ( ) { my $ofh = select STDOUT; $| = 1; select $ofh; $ofh->autoflush(1); print STDOUT $line; }