use strict; my $srcdrive="/dev/hda"; my $pid; $pid = open(PH,"dd if=$srcdrive | gzip -v9 >/dev/hdb1/image.zip |"); select STDOUT;$|=1; while() { print "output = $_"; }