Question: I want a Perl script to accept wildcards (foo-\*.ba?) for file names (which are then processed for a whole directory subtree).

Of course, I can tell the users of my script to quote the argument ('foo-\*.ba?'), but this is not really elegant - the wildcard method is meant as a user-friendly alternative to passing regexes (which are accepted, too, and which, of course, *must* be quoted). The trouble is, that the shell (bash, in my case) expands the command line to the files matching the wildcard pattern in the current directory, so my poor script gets @ARGV preset with whatever the bash found (typically nothing, or a bunch of foo-lotsof.baz etc.).

Is there a copy of bash's unexpanded command line anywhere?

Answer: 
Please don't *try* to work around this. Changing how arguments are interpreted is done by the user in their choice of quoting. Even if you can (and I know there are hooks in bash that I know nothing about that may make it possible) you are not going to provide a better user experience this way, you will provide a worse.
According to bash man page, you can disable expansion of characters \*, ? and [ with the -f switch. See Pathname Expansion.

```
$ bash -f -c 'ls *'
ls: *: No such file or directory

```

But then you have to ask your users to change the way they start bash, or you have to try get control over this. It is simply shifting the problem around.

Your program should deal with the shell behavior, not the other way around.

EDIT: As a final remark, I'd like to point out that using single quotes is common practice in unix shells as a mean to prevent expansion. You should not fear doing the same with your own script.