robert johnson wrote:
> perl 5.8.6 on Win32
>
> i need to redirect STDERR, in order to parse runtime information from a
> flash programmer. the program "monice.exe" runs on either Win98/XP/2000
> just fine, but the command i'm using to redirect STDERR does not work on
> Win98
>
> heres the offending line in my Perl script:
>
> $pid = open
> (PH, "\"C:\\Program Files\\EPITools\\edta22a\\bin\\monice.exe\"
> -vIXP420 -d 192.168.100.251:e < auto_flash.cmd 2>stderr.txt |")
> or die "couldn't fork! $!\n";
>
> note: -v and -d switches are particular to the monice.exe, and the
> auto_flash.cmd is sent to the monice.exe to auto select specific
> text-menu options. there is no issue with any of this. the problem
> (but only on Win98) is with "2>stderr.txt".
>
> now, "2" is supposedly the file descriptor for STDERR. as ive already
> mentioned, it does correctly redirect STDERR to the appropriate text
> file in winXP/2000, but not win98.
>
> on Win98 it complains: 'Cant find file "2" specified on command line',
> then continues to run the "monice.exe" executable as expected, but dumps
> all STDERR to the terminal window (the default behavior), and so my
> program doesnt work worth a hoot.
>
> anyone know a way around this? any help will be much appreciated, as
> this is going to be a big PIMA real quick when manufacturing (and their
> crappy win98 machines) get held up.
You could either grab a cmd.exe shell for 98 (there's one on my Tripod
site) and use that for the shell (you'd have to explicitly add it to the
front of your command line ("c:\wherever\cmd.exe /C ...) or you could
try redirecting STDERR prior to the open or you may be able to handle
it using IPC::Open3.
command.com doesn't do n>x redirects.
--
,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED]
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs