diff --git a/src/languages/perl.js b/src/languages/perl.js
index 32e57105ba..f8923b8884 100644
--- a/src/languages/perl.js
+++ b/src/languages/perl.js
@@ -277,7 +277,8 @@ export default function(hljs) {
)
},
{
- begin: /[$%@][^\s\w{]/,
+ // Only $= is a special Perl variable and one can't declare @= or %=.
+ begin: /[$%@][^\s\w{=]|\$=/,
relevance: 0
}
],
diff --git a/test/markup/mojolicious/default.expect.txt b/test/markup/mojolicious/default.expect.txt
index 7297b9ab99..2238141169 100644
--- a/test/markup/mojolicious/default.expect.txt
+++ b/test/markup/mojolicious/default.expect.txt
@@ -1,8 +1,8 @@
% layout 'bootstrap';
% title "Import your subs";
-%= form_for '/settings/import' => (method => 'post', enctype => 'multipart/form-data') => begin
- %= file_field 'opmlfile' => multiple => 'true'
- %= submit_button 'Import', 'class' => 'btn'
+%= form_for '/settings/import' => (method => 'post', enctype => 'multipart/form-data') => begin
+ %= file_field 'opmlfile' => multiple => 'true'
+ %= submit_button 'Import', 'class' => 'btn'
% end
<div>
% if ($subs) {
@@ -13,7 +13,7 @@
<a dir="<%= $dir %>" href="<%= $item->{htmlUrl} %>"><%== $item->{title} %></a>
</dt>
<dd><b>Categories</b>
-%= join q{, }, sort @{ $item->{categories} || [] };
+%= join q{, }, sort @{ $item->{categories} || [] };
</dd>
</dl>
% }