Passing Arguments into a Program

2002-04-12 Thread Mike
If a program calls a perl script as follows: /tmp/perltest.pl abc def ghi jkl mno Is there a variable which would contain the arguments? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Passing Arguments into a Program

2002-04-12 Thread Mandar Rahurkar
@ARGV is the variable ur looking for ; here is how to assign args to vars; while(@ARGV) { $var1=shift(@ARGV); $var2=shift(@ARGV); } Adios Mandar On Thu, 11 Apr 2002, Mike wrote: > If a program calls a perl script as follows: /tmp/perltest.pl abc def ghi > jkl mno > > Is there a va

Re: Passing Arguments into a Program

2002-04-12 Thread victor
@ARGV in your example $ARGV[0] will be abc $ARGV[1] will be def ...etc Tor. Mike wrote: > > If a program calls a perl script as follows: /tmp/perltest.pl abc def ghi > jkl mno > > Is there a variable which would contain the arguments? > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > F

Re: Passing Arguments into a Program

2002-04-12 Thread drieux
On Thursday, April 11, 2002, at 01:53 , Mike wrote: > If a program calls a perl script as follows: /tmp/perltest.pl abc def ghi > jkl mno > > Is there a variable which would contain the arguments? yes @ARGV - in your case you would be able to play something like my $count=1; f