hmeharward has asked for the wisdom of the Perl Monks concerning the following question:
UPDATE: I REALIZED MY SIMPLE MISTAKE AND FIXED IT! THANK YOU! Hi there! I've been trying to pass a string as a parameter to a program but every time I do I only get the first word. I'm thinking the program is stopping at white space but I need the whole string and I can't find the proper way to do that. Any help appreciated here is what I have so far:
my @variable = $ARGV[0]; my $test = 10; if($test == 10) { print "Testing for success: @variable \n"; }
This prints "Testing for success: Testing" but the whole string should be "Testing for success: Testing output from ExampleChecker." Im passing the string from another driver-like program to test some output for a larger program. The $test variable is just for easy manipulation for me so that's not important.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing a String
by stevieb (Canon) on Nov 17, 2015 at 16:38 UTC | |
|
Re: Passing a String
by NetWallah (Canon) on Nov 17, 2015 at 16:37 UTC |