in reply to portable globbing behavior for command-line tool

I think that this is something specific to Windows, and MS-DOS. Other environments expect the command interpreter to glob out arguments. IIRC the POSIX standard defines this behaviour, so any operating system purporting to be POSIX compliant will exhibit this behaviour.

Anyway, why shouldn't the Win32 perl kernel resolve this anomaly and make Windows conform to the expected behaviour? (Perl 6? wishlist?)

By the by, VMS implements the globbing via the C runtime library. Command lines themselves are not globbed, but by the time they have become cast into (int argc, char *argv[]) they have been globbed.

My $0.02 --rW

  • Comment on Re: portable globbing behavior for command-line tool

Replies are listed 'Best First'.
Re: portable globbing behavior for command-line tool
by Abigail-II (Bishop) on Jul 04, 2002 at 09:50 UTC
    Anyway, why shouldn't the Win32 perl kernel resolve this anomaly and make Windows conform to the expected behaviour?
    That would be too hard. There *are* shells available on Windows that do globbing. Furthermore, even on Unix, it's possible to pass in arguments that haven't been subject to shell expansion (for instance, when called with a call from the exec family from C (or in Perl, when exec is called with more than one argument)). Trying to figure out when to do globbing, and when not is bound to get it wrong sometimes.

    The bottom line is, if you want globbing, use a globbing shell.

    Abigail