in reply to How to do WildChars (*) on the command line for my script

If you're typing
makeupscript.pl -c *.txt
on your shell's command line, the shell will expand that to
makeupscript.pl -c foo.txt bar.txt baz.txt ...
and pass on the expanded file names to the perl script. However, if you prevent expansion by saying
makeupscript.pl -c '*.txt'
then your script will indeed find *.txt somewhere in @ARGS. To do the expansion yourself, check perldoc -f glob.

Replies are listed 'Best First'.
Re: Re: How to do WildChars (*) on the command line for my script
by BrowserUk (Patriarch) on May 28, 2004 at 00:16 UTC

    If you're using a shell that does expand wildcards for you (eg. cmd.exe), then there are several modules around that will do this for you.

    My favourite is Jenda's G.pm (docs) (ppd & .gz(5.8)).


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
Re: Re: How to do WildChars (*) on the command line for my script
by EchoAngel (Pilgrim) on May 28, 2004 at 01:49 UTC
    mmmm is it possible to use this with use getopt::long ?