Fun with Perl 2009-10-06 by: badanov I just finished resolving a vexing problem in a perl CGI script:
if ( $test eq'TESTDATA' ) In the above example, the plugged in html code $dresult printed the first result regardless of what the value of $test was. The solution was to make the perl script extract a part of the string, since various forms of $test existed. Not certain why this worked, except perhaps since this script was executed by the Apache mod_perl module and not directly by the perl interpreter, perl may have "forgotten" it was the primary thread in this process, and failed its instructions. Forcing the script to do a native, fundamental perl function, extract a string, I was able to make the script work as desired. Solution:
$test = 'TESTDATA'; I don't know if extracting the whole string would work, but there is little doubt that it would. -----------------------------------------COMMENTS---------------------------------------- |