If you want "shell" expansion (csh to be exact), the glob function is what you want, or, if you prefer a module and saner expansion, File::Glob. I couldn't follow your description of things you tried, so I won't comment on why they failed for you. If you provide better code, possibly wrapped in <code>...</code> tags, they will be more readable for me and I can maybe tell you where you went wrong.
You seem to be unclear about where "shell expansion" happens - it does not happen within Perl but within your shell. So, if you want shell expansion Just Like Your Shell Does, you will have to call your shell and ask it to expand the pattern.
In many cases, reading the Perl documentation of the built-in functions (perlfunc) helps lots.
In reply to Re: getting shell expansion to work
by Corion
in thread getting shell expansion to work
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |