in reply to Re^2: How to evaluate a variable in a text string
in thread How to evaluate a variable in a text string

It looks like you are confusing the "string form" of eval with the "block form". Try perldoc -f eval to get the full story, and then merlyn's comment may be clearer. To do what you want to do, you need something like

$string = eval qq("$_");
where $_ contains your 'test_string_$val'. But as Roy already pointed out, this may not be a very wise thing to do in the first place.

the lowliest monk