Yes, on Linux system() use bash but on Windows use command.com (W9x/ME) or
cmd.exe (WinNT/2k/XP) and here is the problem :-)
My script must run on Windows, Linux or some other platform where any
webserver and Perl is instaled.

Petr Vileta, Czech republic

----- Original Message -----
From: "Craig B. Nakata" <[EMAIL PROTECTED]>
To: "ActivePerl" <[EMAIL PROTECTED]>
Sent: Friday, June 25, 2004 7:08 AM
Subject: Re: STDOUT problem


> Petr,
>
> Have you tried redirecting STDERR also, the Copyright is probably coming
> from STDERR, try:
>   system ("wzzip.exe >NUL: 2>&1");
>
> I believe the "system" command uses bash as its shell to execute commands.
>
> Hope this helps.
> Craig
>
> Petr Vileta wrote:
> > Output to null device not resolve my problem. External program is
wzzip.exe,
> > the command line utility for Winzip. I don't know how it do it, but
"wzzip
> > something >nul" still show a Copyright info from program :-)
> >
> > Petr Vileta, Czech republic
> >
> > ----- Original Message -----
> > From: "Haimov, Eugene" <[EMAIL PROTECTED]>
> > To: "Petr Vileta" <[EMAIL PROTECTED]>; "ActivePerl"
> > <[EMAIL PROTECTED]>
> > Sent: Friday, June 25, 2004 1:40 AM
> > Subject: RE: STDOUT problem
> >
> >
> >
> >>You can also try redirecting your unwanted output to a null-device.
> >>Eugene Haimov
> >>
> >>-----Original Message-----
> >>From: [EMAIL PROTECTED]
> >>[mailto:[EMAIL PROTECTED] On Behalf Of Petr
> >>Vileta
> >>Sent: Thursday, June 24, 2004 6:22 PM
> >>To: ActivePerl
> >>Subject: Re: STDOUT problem
> >>
> >>
> >>
> >>>Like any other package variable, you can alias STDOUT so that it
> >>>points to a different FILEHANDLE. While it's aliased anything that
> >>>would normally go to STDOUT will go to the new FILEHANDLE. Ex.
> >>>
> >>>#!/usr/bin/perl
> >>>
> >>>use warnings;
> >>>use strict;
> >>>
> >>>open( FH, '>out' ) or die;
> >>>
> >>>*ORIG = *STDOUT;
> >>>*STDOUT = *FH;
> >>>
> >>>print "hello, world!";
> >>>
> >>>*STDOUT = *ORIG;
> >>>
> >>>__END__
> >>
> >>Problem remaining :-( Your code work for perl "print" only but no for
> >>external programs or external program use non standard routines for
> >>output. Please try this part of code
> >>
> >>print "<html><body>";
> >>open( FH, '>out' ) or die;
> >>*ORIG = *STDOUT;
> >>*STDOUT = *FH;
> >>system('echo hallo');
> >>*STDOUT = *ORIG;
> >>print "<br>System command was be run</body></html>";
> >>
> >>in server script and "run" this in browser eg.
> >>http://somedomain.com/cgi-bin/myscript.pl
> >>You will see
> >>
> >>hallo
> >>System command was be run
> >>
> >>Maybe not on Linux but on MS-IIS yes :-)
> >>I resolve my problem with this trick
> >>
> >>print "<span style=\"display: none\;\">";
> >>system('echo hallo');
> >>print "</span>";
> >>
> >>Output from external program still go to browser but for user is not
> >>visible. Have you a better idea?
> >>
> >>Petr Vileta, Czech republic
> >>
> >>_______________________________________________
> >>ActivePerl mailing list
> >>[EMAIL PROTECTED]
> >>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> >
> >
> > _______________________________________________
> > ActivePerl mailing list
> > [EMAIL PROTECTED]
> > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> >
> _______________________________________________
> ActivePerl mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to