if ($string =~ /\"/) { Quoted } else { Unquoted }