in reply to Re^2: Passing switches through pl2bat scripts
in thread Passing switches through pl2bat scripts

The issue is basically the same. At some point 'perl' stops accepting arguments/options to the interpreter itself and starts handing them to the script as @ARGV.

In a typical invocation

perl @perlOpts filename.pl @scriptOpts

everything after filename.pl shows up in @ARGV.

The question becomes, where is that point in your invocation of 'perl' in this particular context?

Replies are listed 'Best First'.
Re^4: Passing switches through pl2bat scripts
by PhilHibbs (Hermit) on Nov 18, 2003 at 09:44 UTC
    In my example, the "%~dpnx0" is the equivalent of filename.pl in your example, so the -z should be passed through. My question has been answered, though, I was misled by the documentation of getopt() and am now using getopts() instead.