in reply to Re^5: Portability of glob function in a modern perl
in thread Portability of glob function in a modern perl

because, on Win32 (and likely VMS), the shell doesn't expand glob filespecs.
That became obsolete since the glob emulates chs behavior regardless OS. Isn't it?

Replies are listed 'Best First'.
Re^7: Portability of glob function in a modern perl
by Corion (Patriarch) on Aug 12, 2005 at 10:47 UTC

    No. Compare the output of the following snippet on Win32 with cmd.exe as the shell and with (say) bash.exe as the (non-default) shell:

    perl -le "print for @ARGV" *

    On Win32 / cmd.exe, this will output:

    Q:\>perl -le "print for @ARGV" * *

    So, obviously, no globbing has taken place.

    Under the bash shell, it outputs a listing of a lot of files, because I started it in a directory with a lot of files:

    bash-2.05b$ perl -le "print for @ARGV" * 44pruefung.py ABGLSAPFIOP.TXT.200405261836 Opics_MurexGD_SapFi.20040526.csv abgleich-MurexGD-SapFi.py abgleich-Opics-MurexGD-SapFi-andere-Konten.py abgleich-Opics-SapFi.py abgleich.py abtest.py go.sh murex_salden_20040526.fi mx_fxdpos_20040526 opics_kassa_20040526.fi opics_termin_20040526.fi ssd_20040526.fi

    This is the difference between the two shells calling Perl, and there is no hidden magic in Perl to unglob stuff.