How to catch a string in parameters?

2002-09-27 Thread Admin-Stress
I want to make a script to print parameter-1, parameter-2, and parameter-3. Parameter-1 and parameter-2 just a SINGLE word. Parameter-3 = string. #!/usr/bin/perl $p1=$ARGV[0]; $p2=$ARGV[1]; $p3=$ARGV[2]; print "$p1 $p2 $p3" Then, I test it like this: ./myscript word word "this i

Re: How to catch a string in parameters?

2002-09-27 Thread Dharmender Rai
I don't know what problem you are facing as the following code runs properly: #! /usr/bin/perl use strict; use warnings; my $var1=$ARGV[0]; my $var2=$ARGV[1]; my $var3=$ARGV[2]; print "var1 is $var1\n var2 is $var2 \n var3 is $var3\n"; Now when you give : how is "that working?" it prints: var