in reply to Parameters incorrect interpreted when passed to perl-standalone

Hi,

I think the "*.zip" is definitely being expanded by the operating system before the perl program is called on it.

Why the compiled version is getting a different result I don't understand.

Or have I got the wrong end of the stick again?

J.C.

  • Comment on Re: Parameters incorrect interpreted when passed to perl-standalone

Replies are listed 'Best First'.
Re^2: Parameters incorrect interpreted when passed to perl-standalone
by marto (Cardinal) on Mar 16, 2017 at 09:19 UTC

    " think the "*.zip" is definitely being expanded by the operating system before the perl program is called on it."

    Why? It works as expected with the same script packaged using a different tool? "I think" followed by "definitely" muddy the waters here :)

Re^2: Parameters incorrect interpreted when passed to perl-standalone
by Yaerox (Scribe) on Mar 16, 2017 at 07:22 UTC
    "I think the "*.zip" is definitely being expanded by the operating system before the perl program is called on it."

    You're correct with the problem on the compiled version. perl -w param.pl *.zip just works fine.

      Try Win32::Autoglob

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
        First of all, the description itself says:

        "If you just add use Win32::Autoglob; in your program, this module will alter @ARGV by performing globbing. I.e., '*.txt' will be expanded to whatever *.txt matches, like ('whatever.bin', 'junk.txt', 'stuff.txt', 'thing.dat') -- or if there are no *.txt files, you'll just get an @ARGV of ('whatever.bin', 'thing.dat')."

        This behaviour is not what I'm looking for. I tested this module and as expected, the module performed globbing before. So I had the same unwanted behaviour on perl just like I got it when running the standalone executable.