in reply to storing variable names in an array

Greetings:
The following code uses refs to access the scalar variables:
our $file1 ="tom"; our $file2 = "bob"; our $file3 = "joe"; my @names =( "file1", "file2", "file3" ); $ref=\@names; $file=$ref->[0]; print ${$file};