in reply to Testing for -c perl switch

... something I learnt only yesterday, if your perl is 5.005ish or later, try testing the $^C variable.

HTH ,

Software is the only product guaranteed to be not fully working at point of delivery.