It depends on what keystrokes you mean. If your user is hitting the Tab key, then you only need print whay you get. If they are using backwhack and 't', you will have to translate somehow.
You are wise to want to avoid eval of user input. How about a simple substitution?
$_ = 'Name:\tFrank\nAge:\t32'; s/\\t/\t/g; s/\\n/\n/g; print;
After Compline,
Zaxo
In reply to Re: unescape a user-entered string?
by Zaxo
in thread unescape a user-entered string?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |