$CryptFile = "crypt.out"; open(OUT,"| crypt > $CryptFile") || die "Can't run crypt\n"; while(<>) { print OUT; } close(OUT);