in reply to Using eval to create a hash

Perhaps this is what you mean:
use strict; use warnings; use Data::Dumper; my $index = q{ 1 => 'foo', 2 => 'bar', 3 => 'baz', }; my %index3 = eval $index; print Dumper \%index3;
OUTPUT:
$VAR1 = { '1' => 'foo', '3' => 'baz', '2' => 'bar' };
Bill