... open(OUT, "|/usr/bin/crontab -u USER -") or die "open: $!"; print OUT ...new crontab contents...; close(OUT);