I _like_ the conceptual idea, here.  But I think we need a different kind of
quoting, not extend single quote semantics.  Single quote semantics are really,
really, good for exact quoting.  I'm sure you (since you mention VMS) find single
quote semantics good for escaping all those $ VMS requires.  Well, we who are
forced to use Windoze find single quote semantics good for escaping all those \
used in NT file names.  So this proposal as now written blows that away:

$x = 'C:\IN\MY\DIRECTORY\THERE\IS\A\FILE\NAMED\$FOO';

Now this was always safe before, but now \I turns on intepolation at the third
character, and ruins the name... what's more $FOO gets interpolated instead of
used as the name.

There just really isn't a character that works inside ' for adding additional
interpolation semantics.

However, let's look at it the other way.  How about instead of trying to _extend_
single quote semantics, that instead we find a way of _disabling_ double quote
semantics?  Let's say within double quotes that \D reverts to single-quote
semantics with the extension that \E ends them again.  Then you VMS people could
write:

        print F <<END;
        \D$!
        $! execute a.com, copy and purge
        $!
        $ @sys$login:a.com
        $ copy \E$filename\D sys$login:*.*
        $ purge sys$login:\E$filename\D
        $!
        $ exit
        END

and we Windoze people could write

  $cmd = "copy \DC:\THERE\\EXISTS\A\$FOO\E /b $targetdir";

(would still have to watch out for those \E, but overall quite better than double
quote semantics through the whole string), and the Unix people will laugh at all
of us.

Failing that, I think a new qX// operator would be the way to go.  Please, please
don't extend single quote semantics with _anything_.
--
Glenn
=====
There  are two kinds of people, those
who finish  what they start,  and  so
on...                 -- Robert Byrne


_______________________________________________
Why pay for something you could get for free?
NetZero provides FREE Internet Access and Email
http://www.netzero.net/download/index.html

Reply via email to