Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!eastapps!hiredgun!tdinger From: tdinger@hiredgun.East.Sun.COM (Tom Dinger - Sun BOS SPA) Newsgroups: comp.lang.perl Subject: Re: MS Perl Questions Summary: 4DOS perl script wrapper Message-ID: <4792@eastapps.East.Sun.COM> Date: 12 Mar 91 02:49:38 GMT References: <1991Mar1.041441.4810@ccu1.aukuni.ac.nz> <1170002@hparc0.HP.COM> <1991Mar8.181952.2377@holos0.uucp> Sender: news@East.Sun.COM Reply-To: tdinger@east.sun.com (Tom Dinger - Sun BOS SPA) Organization: Sun Microsystems, Billerica MA Lines: 52 In article <1991Mar8.181952.2377@holos0.uucp> lbr@holos0.uucp (Len Reed) writes: >In article <1170002@hparc0.HP.COM> dak@hparc0.HP.COM (Dave Kruger) writes: >>4DOS USERS PLEASE STAND UP! >>=========================== >> >>This all works as expected under MS-DOS's COMMAND.COM, however, I'm getting the >>following behaviour under 4DOS (a shareware replacement for COMMAND.COM that is >>approximately 3 million times better--MS-DOS 5.0 addresses some of the >>limitations like aliasing and command history, but still falls a *long* way >>short of 4DOS): > >A couple of months ago I pulled an MS-DOS argument analyzer off the network >that claims to be MKS *and* 4DOS compatible. (My code merely handled >MKS arguments.) Tom Dinger or I will probably get that into the next >release of Mess-DOS-perl. > >-Len >-- >Len Reed >Holos Software, Inc. >Voice: (404) 496-1358 >UUCP: ...!gatech!holos0!lbr OK, in the short run, for you 4DOS users, the wrapper below will correctly work with both COMMAND.COM and 4DOS. I have tested both; I had to go download 4DOS to do it, too. @REM=(qq! perl -S %0.BAT %1 %2 %3 %4 %5 %6 %7 %8 %9 @goto end !) if 0 ; print "Howdy, world!\n"; @REM=(qq! :end !) if 0 ; This works using the "qq" quoting mechanism instead of double-quotes -- apparently, 4DOS expects double-quoted strings not to span multiple lines. If the '!' character is too likely to be in the arguments somewhere, I have also tested it with the '!' character replaced by a Control-A (you know, the little simley-face). But I can't send that version :-). TD Tom Dinger consulting at: TechnoLogics, Inc. Sun Microsystems Internet: tdinger@East.Sun.COM (508)486-8500 (508)671-0521 UUCP: ...!sun!suneast!tdinger