Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!know!samsung!sdd.hp.com!hplabs!hpl-opus!hpnmdla!darrylo From: darrylo@hpnmdla.HP.COM (Darryl Okahata) Newsgroups: comp.lang.perl Subject: Re: Recent patches Message-ID: <8310011@hpnmdla.HP.COM> Date: 24 Aug 90 16:48:49 GMT References: Organization: HP Network Measurements Div, Santa Rosa, CA Lines: 41 In comp.lang.perl, roy@cybrspc.HP.COM writes: > merlyn@iwarp.intel.com (Randal Schwartz) writes: > > > I'd guess your shell is completely ignoring the single quotes, because > > that's the sort of error you'd get from a real shell if you left the > > single quotes off. Too bad (he mutters again). > > T'would seem so. I even tried using backtick (`) quoting under 4dos, and > still had problems. Strangely enough, a small batch file showed that the > ` quoting _does_ deliver the whole string to 4dos as a single argument. > Perl, though, doesn't seem to accept it. (joining in the muttering) Usually, when MSDOS programs are executed, all arguments are *CONCANTENATED* into a single line (which *must* be less than 128 characters -- the ^&%$~#@%?! maximum allowed length of a command line), and this line is passed to the MSDOS program to be executed. With C, the MSDOS startup code (the dos equivalent to /lib/crt0.o) must then parse this line and convert it into argc and argv, which are then passed to main(). I'll bet that it is this second parsing of the command line (the first, I imagine, is done by 4dos) that is causing your problems. The solution is to: 1. Prevent the shell (4dos, in this case?) from interpreting quote characters; these characters should be passed verbatim to the MSDOS program. 2. Modify your MSDOS startup routine to do proper argc/argv processing with quotes. I know that this can be done under both MicroSoft and Turbo C, although I do not have any source code to do this. -- Darryl Okahata UUCP: {hplabs!, hpcea!, hpfcla!} hpnmd!darrylo Internet: darrylo%hpnmd@hp-sde.sde.hp.com DISCLAIMER: this message is the author's personal opinion and does not constitute the support, opinion or policy of Hewlett-Packard or of the little green men that have been following him all day.