heh yeah. Right after I posted I figured out what I was doing wrong.
if ($str1=="string")&&($str2=="string")&&($str3=="string")&&( $str4=="string")){
$var="false";
should actually be
if (/B&&($str2=="string")&&($str3=="string")&&( $str4=="string")){
$var="false";
Don't make the same mistake I did by not encapsulating the whole thing.