Here's another way of looking at your problem that may suggest to you a possible solution; you've got a bunch of characters in a string -- the word. For each letter, either it's a letter that's been guessed, or it isn't. If it has been guessed, just show the letter. Otherwise, show an underscore. You may find that treating the word as an array this way is useful.
perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'
In reply to Re: Lost...
by Chmrr
in thread Character positioning
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |