sub mySub { if ($R) { return; } else { print "CONDITION WORKS\n"; $R = "some string\n"; } }