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.
In reply to Passing a String by hmeharward
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |