in reply to eq statement not working

The output from your 'else' statement shows that $arg never contains a string ending with "\n". Remove the \n character from your elsif statement.

Replies are listed 'Best First'.
Re^2: eq statement not working
by Anonymous Monk on Apr 29, 2009 at 03:31 UTC
    Okay, i found the problem. I was using perl to get my url variables, put them into an array and pass that array to my perl function. This is the code I used to get my url vars:
    $query = new CGI; my @array = (); for $var ( $query->param) { push (@array, $query->b($var) ); }
    Apparently that code adds bold tags to my variables so instead of getting 'vowel' like I thought I should be, i was getting 'vowel' but with '<'b'>' tags. And then when I tried to debug it, everything looked fine because all I saw was that my variable was set to vowel. I recently switched to Ubuntu from windows xp and the fonts in firefox seem slightly different so the fact that it was bold did not stand out greatly to me. And of course, when I copied and pasted the output into the forum, the bold tags were lost anyways.
      Here is a more Perl-ish way to write your code if you're interested:
      my $y = 0; for my $arg (@_){ if ( length $arg == 1 ) { $and .= " AND j$y.LumbolValue = '$arg' " ; # Your elsifs here... } $y++; }
        I am interested - thanks for the tip!!