in reply to Format statement and 'if' loop
if ($subdvn=='KP' && $tow=='RP' && $phase=='1' )
Probably that you are using numeric == to compare strings.
Of course, if you use strict & warnings, you'd now that already.