die "usage: perl argv.test.pl a b c d ...\n" unless @ARGV;
for(0..$#ARGV){
print " ARG $_ $ARGV[0]\n";
}
__END__
C:\>perl argv.test.pl
usage: perl test.pl a b c d ... at argv.test.pl line 2.
C:\>perl argv.test.pl 1 2 a b c
ARG 0 1
ARG 1 1
ARG 2 1
ARG 3 1
ARG 4 1
C:\>
| [reply] [d/l] |
you want $ARGV[$_]
but thats probably a joke
die "usage: perl argv.test.pl a b c d ...\n" unless @ARGV;
for(0..$#ARGV){
print " ARG $_ $ARGV[$_]\n";
}
__END__
C:\>perl argv.test.pl
usage: perl test.pl a b c d ... at argv.test.pl line 2.
C:\>perl argv.test.pl 1 2 a b c
ARG 0 1
ARG 1 2
ARG 2 a
ARG 3 b
ARG 4 c
C:\>
| [reply] [d/l] [select] |
Hi, Can we use a pm file instead of pl file in the above example. ie
my $cmd = join ' ', q(cmd.exe /c start ), qq{"$^X"},__FILE__,'argv';
I want to implement this shell as a part of my application. ie In my main window if i select command from the dropdown menu, it should display this shellUI. If i follow the above procedure it displays seperate process window. Please suggest the solution for my requirement. Thanks
| [reply] [d/l] |