Wait, never mind. I just have the wrong operators.
I have a different question now though. I'm writing an email validation script in PERL and I was wondering if PERL subs allow the returning of some boolean value? My code looks something like this:
if(char_find(@string, $tofind) && is_char($string[1]) && is_char($string[2]))
{
blablah;
}
sub char_find (@string, $tofind)
{
foreach $string(@string)
{
if($string eq $tofind)
{
return ; #is there something like "true" or something that I can put there?
}
}
return ; #false
}
sub is_char($finder)
{
if ($finder eq '_' || /$finder/i eq 'a' || /$finder/i eq 'b...)
{
return ; #true?
}
return ; #false?
}