[TxMt] Perl regexp highlighting errors

Karel Bílek running.cz at gmail.com
Fri Nov 19 03:38:19 UTC 2010

I understand that parsing perl must be pain in ***, but I got some
errors in perl highlighting.

When I write

if ($a =~/ /)

to check, wether there is a space in a word, what happens is that
everything after the second / is treated like a regexp (so, the whole
script becomes green).

When I write the same thing as

if ($a =~ /\ /)

everything work as expected.

I discovered a similar problem with perl bundle some months ago: when I write

$something = $a/$b + $c/$d;

the /$b + $c/ part is highlighted as a regexp, too. Writing a space
between the first / and $ makes it go away.

And the last thing - when I write

for my $file (<data/directory/*>)

to iterate trough all the files in "data/directory/", the /directory/
is, again, highlighted as a regexp.

Best regards,

Karel Bílek

More information about the textmate mailing list