VMS shell quoting help

Michael G Schwern <[email protected]>
Newsgroups gmane.comp.lang.perl.ports.vms
Message-ID <[email protected]>
In debugging a new and fascinating MakeMaker/VMS problem, I discovered this gem:

$ perl -wle "print q[12 '3' 45]"
12 '3' 45
$ perl -wle "print q[12 '' 45]"
12

'' seems to mean something special, even inside double quotes!

What's going on and what's the work around?

For the curious, the issue is this:

	$(NOECHO) $(ABSPERLRUN) "-MExtUtils::Install" -e "pm_to_blib({@ARGV},
'[.blib.lib.auto]', '$(PM_FILTER)', '$(PERM_DIR)')" "--" -

when PM_FILTER is not set.  The argument is completely lost and perl sees:

    pm_to_blib({@ARGV}, '[.blib.lib.auto]', , '755')

to add to the fun, Perl will collapse multiple commas.  So that's equivalent to:

    pm_to_blib({@ARGV}, '[.blib.lib.auto]', '755')

and the PM_FILTER argument is lost to the void. :/


-- 
Defender of Lexical Encapsulation
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.