Try checking for the value of variable $^C...
$ perl -c -e 'BEGIN { print "$^C\n" }' 1 -e syntax OK $ perl -e 'BEGIN { print "$^C\n" }' 0 $
See perlvar for more info.
Good luck,
--
our $Perl6 is Fantastic;
In reply to Re: find out, if perl is started with the -c switch
by Excalibor
in thread find out, if perl is started with the -c switch
by borisz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |