chuckd has asked for the wisdom of the Perl Monks concerning the following question:

I'm calling this statement:
my $numfdel = unlink <$ARGS[0]/TXT/*/*.clean>;
I'm using Komodo IDE to write this and when I use this syntax it messes up my highlighting after this statement. Is there any way I can fix the highlighting issue with this. I tried putting single and double quotes around it but then the statement didn't run correctly.

Replies are listed 'Best First'.
Re: question about unlink and highlighting
by Fletch (Bishop) on Sep 15, 2008 at 01:50 UTC

    Rather than using the <>-as-glob-operator you might see if it handles the equivalent glob version (e.g. glob( "$ARGS[0]/TXT/*/*.clean" ); I'd prefer that anyhow as it's clearer than the diamond form).

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Re: question about unlink and highlighting
by toolic (Bishop) on Sep 15, 2008 at 02:00 UTC
    Other potential work-around solutions (after you try Fletch's suggestion):
    • File::Glob
    • Try to determine, by trial and error, which character is considered "unbalanced", according to your editor. Then try to add that character in a comment after the code. For example, if the editor is unhappy with an odd number of slashes, then this may fix it:
      my $numfdel = unlink <$ARGS[0]/TXT/*/*.clean>; # /
Re: question about unlink and highlighting
by ysth (Canon) on Sep 15, 2008 at 07:49 UTC

      I personally believe that since "nothing but perl can parse Perl," it can't be exactly described as a bug: more of a feature request, and in this sense it may be doable. (ISTR that for my text editor of choice, for example, it wouldn't be, unless one modified the whole SH mechanism, that is...)

      --
      If you can't understand the incipit, then please check the IPB Campaign.
        It isn't exactly parsing perl :) besides Scintilla (among others) handles this just fine :)
Re: question about unlink and highlighting
by Anonymous Monk on Sep 15, 2008 at 07:43 UTC
    Is there any way I can fix the highlighting issue with this.

    1) report bug to Komodo IDE 2) turn hilighting off (coding around hilighting bugs is dubious )