in reply to Setting Conditional Variable Based on Partial Match
$type = "S"; [download]
Side note... this:
$PP=$PP+1; [download]
can also be written more concisely as:
$PP++; [download]