APM: Question: How to access command line before its parsed into @ARGV
Brent LaVelle
brentlavelle at yahoo.com
Thu Aug 25 06:35:02 PDT 2005
You will not see the "" in Perl or C as the shell eats them. If you
want to see the quotes you have to quote them. Look at the second and
third examples below:
lavelle:~> perl -e 'print join(" ", at ARGV),"\n"' foo "bar"
foo bar
lavelle:~> perl -e 'print join(" ", at ARGV),"\n"' 'foo "bar"'
foo "bar"
lavelle:~> perl -e 'print join(" ", at ARGV),"\n"' foo \"bar\"
foo "bar"
All this quoting nonsense is a shellism, nothing to do with perl. You
will see the effect of the quotes (or backslash) when there is some
whitespace or quotes in a paticular argument.
--- Bill Raty <bill_raty at yahoo.com> wrote:
> Thanks for the inputs. Update:
>
> $ENV{'CMD_LINE'} - can't repro on either WinXP64 or AIX
>
> GetOpt::Long - has a specific caveat blaming CLI
>
> I'm still searching.
>
>
>
> -Bill
> Reintarnation: Coming back to life as a hillbilly
>
> _______________________________________________
> Austin mailing list
> Austin at pm.org
> http://mail.pm.org/mailman/listinfo/austin
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Austin
mailing list