develooper Front page | perl.vmsperl | Postings from January 2002

Re: VMS perl 5.6.1 system() stdout redirect problem

Thread Previous
From:
Craig A. Berry
Date:
January 21, 2002 21:30
Subject:
Re: VMS perl 5.6.1 system() stdout redirect problem
Message ID:
a05101000b872a8071d4c@[172.16.52.1]
June,

I'm afraid I don't know exactly when or how this was fixed, but the
latest development version (leading up to 5.8.0) has the behavior
you're looking for:

$ perl test.pl >jy1.tmp 2>jy2.tmp
$ type jy1.tmp
%COPY-E-OPENIN, error opening D0:[CRAIG.PERL]TEST1.TMP; as input
-RMS-E-FNF, file not found
output to stdout
$ type jy2.tmp
%COPY-E-OPENIN, error opening D0:[CRAIG.PERL]TEST1.TMP; as input
-RMS-E-FNF, file not found
output to stderr

You can get this version of Perl here:

http://www.funet.fi/pub/languages/perl/snap/perl@14369.tgz

but it is not recommended for production systems.

At 11:07 AM -0400 1/16/02, June Young from DV wrote:
>Hi,
>
>I have reported this problem before, and wonder whether there is any
>patch for this?  (This problem does not exist in perl 5.00406.)
>
>In the following perl script,
>the output of system() seems to be lost if I redirect the stdout to a
>file.
>
>test.prl
>==========
>system("copy test1.tmp test2.tmp");
>print stdout "output to stdout";
>print stderr "output to stderr";
>
>A:001029> perl test.prl
>%COPY-E-OPENIN, error opening DSA0:[DYMAX.001029]TEST1.TMP; as input
>-RMS-E-FNF, file not found
>output to stdout
>                output to stderr
>
>A:001029> perl test.prl >jy1.tmp 2>jy2.tmp
>A:001029> type jy1.tmp
>output to stdout
>A:001029> type jy2.tmp
>output to stderr
>
>
>Thanks,
>
>JY
>
>--
>June Young, Software Development                bus: (902)422-1973 x144
>Dymaxion Research Ltd., 5515 Cogswell St.,      fax: (902)421-1267
>Halifax, Nova Scotia, B3J 1R2 Canada         mailto: JYoung@dymaxion.ca
>                                               http://www.dymaxion.ca


-- 
____________________________________________
Craig A. Berry                  
mailto:craigberry@mac.com

"Literary critics usually know what they're
talking about. Even if they're wrong."
	-- Perl creator Larry Wall

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About