or download this
qwurx [shmem] ~> perl -e 'open my $fh,"|-","ssh localhost"; while(<STD
+IN>){print $fh $_}'
Pseudo-terminal will not be allocated because stdin is not a terminal.
...
qwurx [shmem] ~> ls -lrt | tail -2 <--- after perl terminated
-rw-r--r-- 1 shmem shmem 0 Mar 15 18:30 blorflydick
-rw-r--r-- 1 shmem shmem 0 Mar 15 18:30 gobbledygook