Thankyou!  I didn't mean to denigrate textmate, but had been wondering why things didn't look as nice as I thought they should, when I realized the regex was causing problems!<div><br></div><div>Thanks again.  -thomas<br>
<br><div class="gmail_quote">On Tue, Nov 8, 2011 at 1:57 PM, Hans-Jörg Bibiko <span dir="ltr"><<a href="mailto:bibiko@eva.mpg.de">bibiko@eva.mpg.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On 8 Nov 2011, at 20:38, Thomas Blom wrote:<br>
<br>
> I was trying to figure out why the syntax highlighting in perl sucked so much, when I realized it was getting messed up by some regex code.<br>
><br>
> Paste this into file (e.g. <a href="http://test.pl" target="_blank">test.pl</a>) and view in textmate.  Does the 2nd function hilight correctly?  It is the /\\/ regex I think - comment the first one out and watch the hilighting change.<br>

><br>
> sub fn() {<br>
>       # some perl code<br>
>       my $f = shift;<br>
>       if( $f =~ /\\/ ) {<br>
>               my $var = "Hello";<br>
>       }<br>
> }<br>
><br>
> sub fn2() {<br>
>       # some perl code<br>
>       my $f = shift;<br>
>       if( $f =~ /\\/ ) {<br>
>               my $var = "Hello";<br>
>       }<br>
> }<br>
<br>
<br>
</div>Hi Thomas,<br>
<br>
syntax highlighting for Perl is not so easy but in that case you can fix the highlighting if you simply make usage of the "standard" syntax in the if clauses:<br>
<br>
        ...<br>
        my $f = shift;<br>
        if( $f =~ m/\\/ ) {<br>
        ....<br>
<br>
<br>
write m// instead of // .<br>
<br>
Cheers,<br>
--Hans<br>
<br>
_______________________________________________<br>
textmate mailing list<br>
<a href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a><br>
<a href="http://lists.macromates.com/listinfo/textmate" target="_blank">http://lists.macromates.com/listinfo/textmate</a><br>
</blockquote></div><br></div>