If you need to know this because you are grabbing resources in BEGIN blocks and want to avoid doing that when it is just a compile check, it would probably be better to turn the BEGIN block into an INIT block instead (which is executed only after compilation is complete, at the beginning of the runtime phase), thus avoiding the need for the check.
See perlmod for the gory details about BEGIN, CHECK, INIT and END blocks.
Hugo
In reply to Re: find out, if perl is started with the -c switch
by hv
in thread find out, if perl is started with the -c switch
by borisz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |