#!/usr/bin/perl system 'mknod thepipe p' unless -p 'thepipe'; if ( fork ) { system q(xterm -e 'exec < thepipe; cat'); } else { open F, '>thepipe'; select F; $|++; for (1..30) { print "and a $_ woot!\n"; sleep 1; } } unlink 'thepipe';