in reply to Re^3: Using IO::File to redirect STDOUT
in thread Using IO::File to redirect STDOUT

Okay, bear with me as I'm more confused than ever. Here's another piece directly from the text (pp 30 - 31):

"...$result = $fh->open($filename,[,$mode [,$perms]]) You can reopen a filehandle object on the indicated file by using its open() method. The input arguments are identical to new(). The method result indicates wheter the open was successful.
This is chiefly used for reopening the standard filehandles STDOUT, STDIN, and STDERR. For example:
STDOUT->open(">log.txt") or die "Can't reopen STDOUT: $!";
Calls to print() will now write to the file log.txt...."

This is also incorrect?

Thanks again for the help,
njcodewarrior

Replies are listed 'Best First'.
Re^5: Using IO::File to redirect STDOUT
by ikegami (Patriarch) on May 09, 2006 at 02:08 UTC
    That's the code you had in your OP. As you know, that doesn't work.