in reply to print help

I see that you have solved your problem. Additionally, you could use qq to reduce some of that clutter (fewer quotes and backwhacks):
print qq/%CALC{"\$EVAL( R$c:C2 - R$pi:C2)"}/;