in reply to Printing Variable Variables

Update: Please note that eval could be risky/dangerous. I got carried away and gave you an answer that you are looking for. However, I feel pg's and graff's solutions are much better and you should consider using that idea instead of eval. Thanks to merlyn for prompting me to explain!

You want to eval

is this what you want?

#!/usr/bin/perl -w use strict; my $string0 = "Jessy"; my $string1 = "Bob"; my $string2 = "Nancy"; my $num = 0; while( $num != 3 ) { print eval ('$string' . $num),$/; $num++; } __END__ Jessy Bob Nancy