home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!csus.edu!netcom.com!jfh
- From: jfh@netcom.com (Jack Hamilton)
- Subject: Re: How to run a Perl under DOS?
- Message-ID: <1993Jan12.170523.9871@netcom.com>
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- References: <1272@alsys1.aecom.yu.edu> <1993Jan11.062312.323@netcom.com> <1278@alsys1.aecom.yu.edu>
- Date: Tue, 12 Jan 1993 17:05:23 GMT
- Lines: 45
-
- In article <1278@alsys1.aecom.yu.edu> manaster@yu1.yu.edu (Chaim Manaster) writes:
- >In article <1993Jan11.062312.323@netcom.com> jfh@netcom.com (Jack Hamilton) writes:
- >>>>>>1 >> @rem = '
- >>>>>>2 >> some dos batch commands
- >>>>>>3 >> PERL -S %0.BAT %1 %2 %3 (etc)
- >>>>>>4 >> GOTO ENDOFPERL
- >>>>>>5 >> ';
- >>>>>>6 >> # your perl script here
- >>>>>>7 >> __END__
- >>>>>>8 >> :ENDOFPERL
- >>>>>>9 >> some more DOS if you need it
- >>>>>>10 >> rem Drop through end of Batch file
- >>>
- >What I don't see is where either the single quotes or double quotes
- >you refer to, come from. The only quotes in the script above,
- >enclosing lines 1-5 (single quote) are used by perl once it has
- >already been invoked and for all practile purposes thrown away.
-
- Right.
-
- >Teh line seen by the perl line as seen by the DOS processor has NO
- >quotes (of either kind) at all. So the last three or four lines of
- >your reply above still confuse me.
-
- Perhaps I was misunderstanding your question.
-
- >My original question was meant to be, if (for example) lastname was
- >replaced by Henry$lastname would perl expand the $lastname part of
- >the parameter, and would DOS either choke or expand it as well?
-
- If you have a PC, why don't you just try it yourself? It may be a better
- way to learn. Try both kinds of quote marks.
-
- >And
- >if you wanted to prevent expansion by either DOS or perl what would
- >you do?
-
- Perl won't expand inside single quotes. I'm not sure how I'd escape a
- percent sign in DOS because I've never needed or wanted to do so, and my
- DOS manual is all the way on the other side of the room.
-
- --
-
- -----------------------------------------------------------------------
- Jack Hamilton jfh@netcom.com P. O. Box 281107 SF, CA 94128-1107
-