perl Version: 5.8.0 #!/usr/local/bin/perl -w # program ht use strict; my $file = "temp.html"; my $ret = 0; open(HTML,">$file"); print HTML ("\n"); print HTML (" $_ ") while(<>); print HTML ("\n\n"); close(HTML); # close(STDIN); # links breaks if I close it explicitly $ret = system("links",$file); die "System command failed\n" if ($ret & 0xffff); Usage: ht myfile (works fine, displays HTML file in browser and terminates well) ht (RETURN) Enter values on STDIN ^D (works fine) head myfile | ht (without closing stdin) (no display on the browser)