while ( $users = $sth->fetchrow_array ) { if(param("username") =~ /$users/i) {
Assuming that the user is the first element in the array you just fetched, try if ( param("username") =~ /$$users[0]/i ) { Bah. I was getting fetchrow_array() confused with fetchrow_arrayref() (Thanks, jwest).
So, add a print statement. What is in $users? What is in param("username")?
Regardless, take japhy's advice, and don't do this with a regex.
In reply to Re: /i regex modifier
by dws
in thread /i regex modifier
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |