while ($x =~ /(\.)/) { $temp = ord($1); $x =~ s/\./$temp/; }
but then it would do around 64k regexes on a single string, which wouldnt be cool. Is there a way to get around this using a single regex or without resorting to pack() or am I better off just running through each character in a for loop with substr and converting it that way?
In reply to Converting ascii to numbers by toonski
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |