$/=$];$_=<>;s/=/==/g;s/^([^:\x0d ]*)$/;PRINT($1)/mg;eval's/(\w)(\d)/$1 $2/;s/}{/}ELSE{/;s/(.*):{\./";SUB $1"x2 ."\{"/ge;s/ ?(.)\./.MY \$$1=SHIFT;/;s/\$(.)(.*[^\$])\1/\$$1$2\$$1/;s/ (([^;{}()\x0d ]|\([^)]+\))+) / $1,/;'x99;s/(?<!if )\(/+(/g;$\='\x0d ';eval lc$_
Note that non-ascii characters in the above source code will be escaped (such as \x9f).