> I'm trying to write a portable echo for MakeMaker.  Everything's
> fine except for echoing XML...

> $ perl -wle "print [EMAIL PROTECTED]" "<foo>"
> Can't open input file foo> as stdin
> %RMS-F-SYN, file specification syntax error

> I can't figure out how to escape < when its the first piece of input.
> This works...

> $ perl -wle "print [EMAIL PROTECTED]" " <foo>"'
>  <foo>

> but that alters the input.

> So how do I escape a < on the VMS command line?

I have a not terrifically useful answer:

The redirection is being handled by Perl, not by DCL (the VMS shell); it
doesn't do redirection.  There's something in the Perl startup on VMS that
examines the arguments and sees whether they begin with < or > and tries to do
the right thing.  That's why quoting doesn't take away the redirection juju as
it would on Unix.

It seems extremely likely to me that we're screwed in terms of maintaining
backwards compatibility (redirection has to keep working or lots of existing
scripts break) and keeping up this capability.  The only thing I can think of
offhand is inventing more juju, specifically a kind of command-line quoting
that Perl can see in argv and knows just to strip but not to check for
redirection.  I suggest something like

$ perl -wle "print [EMAIL PROTECTED]" ="<foo>"

but it's still kinda messing with the input.

-- Alan

===============================================================================
 Alan Winston --- [EMAIL PROTECTED]
 Disclaimer: I speak only for myself, not SLAC or SSRL   Phone:  650/926-3056
 Paper mail to: SSRL -- SLAC BIN 99, 2575 Sand Hill Rd, Menlo Park CA   94025
===============================================================================

Reply via email to