[BUG]Syntax Highlight Error on Perl's "$#data"

Started by: shaohao2 voices2 posts


@data = (1,2);
for ( my $i = 0; $i < $#data; ++$i) {
....

As we know, the "$#" mean the last element of a list in Perl.
But EE's Syntax highlight will be error to display the "$#data" -- "#data" will be treated as a comment.

shaohao wrote:

@data = (1,2);
for ( my $i = 0; $i < $#data; ++$i) {
....

As we know, the "$#" mean the last element of a list in Perl.
But EE's Syntax highlight will be error to display the "$#data" -- "#data" will be treated as a comment.

EmEditor's syntax highlighting is designed to be generic, so this inconvenience can happen. You might want to remove # from the comment string in the Highlight (2) tab of configuration properties.

2 posts in this topic