| not sure if it will help everything but try:
chomp ($_=<STDIN>);
instead of simply
$_ = <STDIN>;
this will chop the newline off that is tagged onto the end of the line when you hit return. now are you prompting the user to input some text (or hex) and hitting enter? if so, you want to chomp the newline again. you may also want to chomp the end of the line, just to make sure you are stripping the newlines out. like i said, may not solve everything, but could help. haven't played around with ascii-hex conversion with perl. |