View Single Post
Old 01-23-2003, 12:52 PM  
Rip
Confirmed User
 
Join Date: Jan 2001
Location: somewheres wet
Posts: 1,456
perl gurus, string checking

So first off, I have never taken a lesson in C or perl, but am pretty good with most computer languages

I have come up with a stumbling block in a perl script that I am working on, in particular checking for equality in a string value, and am looking for help

I have a simple form with user choices

1; value = 'nochoice'
1; value = 'yes'
1; value = 'no'

form input is parsed
and handed to the subroutine

if ($value ne "nochoice") {$modifyfield = 26; $searchtext eq $value;}

which did not find true upon any value other than 'nochoice' (in otherwords i want the true value to function, on a choice of yes or no

so I added

$value =~ /$value/i ;

before the if statement to try and clean up any possible erroneous charactures or whatever, but it's still not working

what am i doing wrong, any ideas

(if this doesn't display in the forum, I'll try an imagelink)

Last edited by Rip; 01-23-2003 at 12:54 PM..
Rip is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote