in reply to Printing Variable Variables

This is what was retunred when I ran your code with perl -w:

Global symbol "$string" requires explicit package name at math1.pl lin +e 10. Execution of math1.pl aborted due to compilation errors.

You would have found out the issue very easily by yourself, if you have warnings on.

What you want is an array, and it is a bad idea to do what you are trying to do (and I am not going down the eval path):

use strict; use warnings; my @strings = ("Jessy", "Bob", "Nancy"); for (@strings) { print $_, "\n"; }

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.