$value =~ tr/+/ /;
performs transliteration on $value and thus translates characters like !, @, #, etc. to their hex equivalents ... that is, # becomes %23.
No. Assuming there's any point to the code in the first place (see JavaFan's reply), the tr/// transliteration operator does limited character substitution.
$value =~ tr/+/ /;
transliterates + plus signs into spaces.
>perl -wMstrict -le "my $value = '!@#+&*'; $value =~ tr/+/ /; print qq{'$value'}; " '!@# &*'
In reply to Re: Need help understanding some code ...
by AnomalousMonk
in thread Need help understanding some code ...
by Perobl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |