Hello wise monks and nuns,

win32 systems do not glob * in the command line. Infact when I want a * to be expandded I use a BEGIN blok like BEGIN { @ARGV =  map glob, @ARGV; print qq(considering ).scalar @ARGV.qq( files\n);}

But today I've packed a little script that accepts a * as first argument and the packed version do not worked in the same way as the original perl program.

As test i packed the following oneliner:

pp -e "print join qq(\n), @ARGV" -o printargv.exe >printargv.exe hello world! hello world! >printargv.exe * # all plain files and dirs in current path (no dot files in the list.. +) >printargv.exe *.pl # all .pl file in current directory

What is happening there? Is PAR globbing for me?

As suggested by Corion the following shows how the simple perl version runs:

>perl -we "print join qq(\n), @ARGV" * *

As you can see a lone star is printed.

L*

PS

#strawberry perl version perl 5, version 26, subversion 0 (v5.26.0) built for MSWin32-x64-multi +-thread PAR 1.015 PAR::Packer 1.041

UPDATED after beech's request below:

Summary of my perl5 (revision 5 version 26 subversion 0) configuration +: Platform: osname=MSWin32 osvers=6.3 archname=MSWin32-x64-multi-thread uname='Win32 strawberry-perl 5.26.0.2 #1 Sat Sep 2 16:25:32 2017 +x64' config_args='undef' hint=recommended useposix=true d_sigaction=undef useithreads=define usemultiplicity=define use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='gcc' ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANS +I_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLIC +IT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields' optimize='-s -O2' cppflags='-DWIN32' ccversion='' gccversion='7.1.0' gccosandvers='' intsize=4 longsize=4 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 ivtype='long long' ivsize=8 nvtype='double' nvsize=8 Off_t='long long' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='g++.exe' ldflags ='-s -L"D:\ulisseDUE\perl5.26.64bit\perl\lib\CORE" -L"D:\u +lisseDUE\perl5.26.64bit\c\lib"' libpth=D:\ulisseDUE\perl5.26.64bit\c\lib D:\ulisseDUE\perl5.26.64b +it\c\x86_64-w64-mingw32\lib D:\ulisseDUE\perl5.26.64bit\c\lib\gcc\x86 +_64-w64-mingw32\7.1.0 libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 + -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 - +lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomd +lg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_ +32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 libc= so=dll useshrplib=true libperl=libperl526.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs dlext=xs.dll d_dlsymun=undef ccdlflags=' ' cccdlflags=' ' lddlflags='-mdll -s -L"D:\ulisseDUE\perl5.26.64bit\perl\lib\CORE" +-L"D:\ulisseDUE\perl5.26.64bit\c\lib"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at Sep 2 2017 16:39:31 %ENV: PERL_JSON_BACKEND="JSON::XS" PERL_RL="Perl" PERL_YAML_BACKEND="YAML" @INC: D:/ulisseDUE/perl5.26.64bit/perl/site/lib/MSWin32-x64-multi-thread D:/ulisseDUE/perl5.26.64bit/perl/site/lib D:/ulisseDUE/perl5.26.64bit/perl/vendor/lib D:/ulisseDUE/perl5.26.64bit/perl/lib

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

In reply to PAR pp glob for me on windows? by Discipulus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.