in reply to Testing for -c perl switch

Hi ddebrito,

Yes ... from perlvar:

$COMPILING $^C The current value of the flag associated with the -c switch. Mainly of use with -MO=... to allow code to alter its behavio +r when being compiled, such as for example to AUTOLOAD at compi +le time rather than normal, deferred loading. See perlcc. Set- ting "$^C = 1" is similar to calling "B::minus_c".

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^2: Testing for -c perl switch
by ddebrito (Sexton) on Apr 18, 2007 at 21:03 UTC
    $^C does the trick.

    I need to update my Camel book. It's only the 2nd edition and did not cover $^C

      Your manual came with your copy of perl. Its up to date.

      ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

        If he's running Debian, no it didn't. It didn't come with all the core modules either.