Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!bu.edu!att!tut.cis.ohio-state.edu!ucbvax!agate!shelby!msi.umn.edu!cs.umn.edu!cybrspc!roy From: roy%cybrspc@cs.umn.edu (Roy M. Silvernail) Newsgroups: comp.lang.perl Subject: Re: MS-PERL and stdout Message-ID: <0gmcV2w163w@cybrspc> Date: 6 Jan 91 10:47:08 GMT References: Organization: Villa CyberSpace, Minneapolis, MN Lines: 24 rm55+@andrew.cmu.edu (Rudolph T. Maceyko) writes: > What's the best way to make an msperl (pl 41) script behave as a > normal unix one does with regards to pipes and such? > > C:\> SCRIPT > LPT1 > > It would be nice to be able to do such redirects, but both msperls > (pl18 and 41) seem to write directly to CON. I'm no DOS guru, but > this is a little disconcerting. And a little confusing! I have been using Perl on my DOS box since PL18 came available, and I never experienced this difficulty. I regularly redirect the output of Perl scripts (now with PL41) to files or pipes. (piping to list.com is a favorite) > BTW, open(STDOUT, ">-") kills the script, even if STDOUT is closed first. I haven't tried that, yet... p'raps I'll experiment a bit tonight. -- Roy M. Silvernail -- roy%cybrspc@cs.umn.edu - OR- cybrspc!roy@cs.umn.edu Department of redundancy department, or "Take the long way home...": main(){system("perl -e '$x = 1/50; print \"Still just my \\$$x!\n\"'");} [new year, new .sig, same ol' cyberspace]