I know so far that the "tr///" operator performs a substitution on the individual characters in a string. I know how to build at uuencoded string by hand. By taking the ASCII decimal value of the character, then converting the ASCII to binary. Next shifting the left 6 bits and converting back to decimal. Next, add 32 to the new value to get a ASCII code back (A_Za-z0-9+/). So my question is how does the following do that in one step?$str =~ tr|A-Za-z0-9+/| -_|; # convert to uuencoded format
This code snippet comes from MIME::Base64::Perl decode_base64() function.$str =~ tr|A-Za-z0-9+/| -_|;
In reply to Converting To Uuencoded Format by vegasjoe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |