Hi tybalt89,
Very clever :-)
Building on your idea, this appears to be a bit faster: $string=~tr/abcd/\x00\x01\x10\x11/; unpack('H*', $string);
Regards,
-- Hauke D
In reply to Re^2: convert each character of a string to number
by haukex
in thread convert each character of a string to number
by Lowry76
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |