The following snippet of code, when saved with a ".pl" file extension
breaks the colour coding in Vim
--------------------
#!/usr/bin/perl -w
my $surname = "ABC-DEF GHI";
@split = split ( / |-|\/|\"/ , $surname , -1 );
foreach ( @split )
{
print "$_\n";
}
--------------------
The lines after the split (that contains a regular expression) are
highlighted as if they are within a double quoted string. The colour
coding is being confused by the " character in the regular expression
and thinks (incorrectly) that it marks the start of a string. Is it
possible to fix this problem? For example the "foreach" text should
appear in yellow.
Thanks.
Jon.