Hi everyone,

Given the following code why does it print out "Valid chars in string."?  
In other words why does the space between "San" and "Jose" not make the 
if expression true?

my $string = "San Jose";

if ($string !~ /[a-zA-Z]/) {
  print "Invalid characters in string."
}         
else {
  print "Valid chars in string."          
}               

Thanks.  

-- 
Carlos 
www.internetsuccess.ca

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to