Replace smartmatch operators

Since perl 5.18, this produces a 'Smartmatch is experimental' warning.