rm55+@andrew.cmu.edu (Rudolph T. Maceyko) (01/03/91)
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. BTW, open(STDOUT, ">-") kills the script, even if STDOUT is closed first. Rudy
roy%cybrspc@cs.umn.edu (Roy M. Silvernail) (01/06/91)
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]