$ans =~ y/[[:space:][:cntrl:]]//d;
As the docs say (--> 'Note that "tr" does not do regular expression character classes such as "\d" or "[:lower:]"'), character classes cannot be used with tr/// (which is the same as y///). Use regex substitution (s///) instead.
In reply to Re: Strip filename
by almut
in thread Strip filename
by kalyanrajsista
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |