[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] How do I redirect STDERR to text file?



Chris Nandor writes:
|At 19.38 1998.04.14, Robert Stevenson wrote:
|>I'd like to be able to redirect all of the STDERR text (currently going to
|>MacPerl's console window) and have it instead go to an external text file.
|    open(STDERR, ">some:file.txt") || die $!;

I suspect Chris meant:

    open(STDERR, ">some_file.txt") || die $!;

Because : is the path separator on the Mac, akin to / in Unix and / and
\ in Windows, the first will only work if you have a folder named "some"
in the same directory as the script, and you will end up with a file
named "file.txt" in that folder. If you don't have a folder named "some"
the first open above will fail.

Brian

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch