From raymond_turney at yahoo.com Fri May 25 15:35:25 2007 From: raymond_turney at yahoo.com (Raymond Turney) Date: Fri, 25 May 2007 15:35:25 -0700 (PDT) Subject: [Perlmonks-pm] how to redirect STDOUT back to /dev/tty Message-ID: <899582.11451.qm@web32807.mail.mud.yahoo.com> Hi, I am redirecting STDOUT to a file in order to store the output of a system command, unfortunately I want it back and am having trouble getting it redirected back to /dev/tty: open(STDOUT, ">/tmp/dkimkey.pem"); my @args=("/usr/bin/openssl", "x509", "-inform", "pem", "-in", "/tmp/09.pem", "-pubkey", "-noout"); system(@args)==0 or die "system @args failed: $?"; close (STDOUT); open (STDOUT, ?>/dev/tty?); I have also tried "/dev/tty" in the second open without redirection. Neither works Pretty clearly I'm missing something. Any help available would be much appreciated. Ray, --------------------------------- Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/perlmonks-pm/attachments/20070525/0cf74969/attachment.html