So, I have a very gooky specification, a program takes in text from the command line; like "Hello, how are you", then saves aforesaid text character by character as a folder.
So H gets turned into '01234.H.something' and , into '01234.Comma.something'.
Another program then scans the folder and reads the folder names with a certain prefix and concatonates everything back together before sending it off to get processed and returning a string of its own to be saved as folder names. (I know, very wierd protocol, not my fault ><).
Problem is:
The data comes out of STDIN fine, or out of the response, and is saved fine into the folder names according to a hash table that maps up all the values. BUT during the read process it gets mangled into something like this:
Hello My Name is Chris: 0ell0 0y0name0i0C0ris
There doesnt appear to be any logic to the mangling, and i'm at a loss as to what is causing it; although it seems to be linked to my hashtable which is being searched like this:
sub findCharacterAsKey { my $loebnerLetter = shift; while (($key, $value) = each %$keymap) { if($loebnerLetter eq $value) { printf("$loebnerLetter maps to $value so returning $key\n"); + return $key; } } }
Any help would be appreciated, thanks.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |