in reply to Emacs CPerl mode - confused?

Interestingly, putting double quotes around $! seemed to satisfy CPerl.
$rc = ( "$!" ? undef : 1 );

Replies are listed 'Best First'.
Re^2: Emacs CPerl mode - confused?
by LanX (Saint) on Feb 24, 2014 at 23:49 UTC
    C-h v cperl-version ?

    update

    I can confirm that indentation also gets confused and your quoting-workaround solves this.

    my cperl-version "6.2" should be quite new, though Ilya's page seems to be down...

    I don't really trust the rumors that J. Rockway took over maintainership, without seeing such an announcement from Ilya.

    Cheers Rolf

    ( addicted to the Perl Programming Language)

      This is something that happens with some built-in perl variables and also when using regexes sometimes. With the built-in variables I use () around them to make the syntax colouring work out, like this

      $rc = ( ($!) ? undef : 1 );

      I didn't test in this particular case, but that should work better. using "" may alter behaviour (or not), so I'm less keen on using that...

      Highlighting with regexes can be more cumbersome to correct, but that's not the problem you have right now ;)

      --

      ecocode