> perl -cw cpanm
Useless use of /d modifier in transliteration operator at cpanm line 462.
cpanm syntax OK
Since 5.12 using /d in a tr raises a warning
Useless use of /d modifier in transliteration operator at -e line 1.
We should either consider
removing the /d modifier
or if we want to preserve it, only do so for version lower than 5.12
This can be checked by simplified using the following one-liner
# warning since 5.12
5.28> perl -w -e 'my $x = qq[a\nb\nc\n]; $x =~ tr/\n/ /d; print qq{$] :$x:\n}'
Useless use of /d modifier in transliteration operator at -e line 1.
5.028000 :a b c :
...
> perl -w -e 'my $x = qq[a\nb\nc\n]; $x =~ tr/\n/ /d; print qq{$] :$x:\n}'
Useless use of /d modifier in transliteration operator at -e line 1.
5.012005 :a b c :
this is not a problem with versions before 5.12
# with /w
> perl -w -e 'my $x = qq[a\nb\nc\n]; $x =~ tr/\n/ /d; print qq{$] :$x:\n}'
5.010001 :a b c :
# with /w
> perl -w -e 'my $x = qq[a\nb\nc\n]; $x =~ tr/\n/ /d; print qq{$] :$x:\n}'
5.008009 :a b c :
# without /w
> perl -w -e 'my $x = qq[a\nb\nc\n]; $x =~ tr/\n/ /; print qq{$] :$x:\n}'
5.008009 :a b c :
cpanm raises a warning
Since 5.12 using
/d
in atr
raises a warningUseless use of /d modifier in transliteration operator at -e line 1.
We should either consider
This can be checked by simplified using the following one-liner
this is not a problem with versions before 5.12
from https://perldoc.perl.org/perlop.html#Quote-Like-Operators