[root@itx2 ~]# cat x8.pl use DBI; use threads; use threads::shared; my $dsn :shared; my %hash :shared; my $Sdatabase :shared; $Sdatabase = '/opt/asd/sql/dbi-indexed-GeoLite2.db-sqlite-old';# $ARGV[0]; $dsn = "DBI:SQLite:dbname=$Sdatabase"; $hash{"$Sdatabase"} = shared_clone(DBI->connect($dsn, '', '', { PrintError => 1, RaiseError => 1, AutoCommit => 0, ReadOnly => 1 })); print '$hash{"$Sdatabase"} -> ' . $Sdatabase . ' -> ' . $hash{"$Sdatabase"} . "\n"; print '$hash{"$Sdatabase"} -> ' . $Sdatabase . ' -> ' . $hash{"$Sdatabase"} . "\n"; print '$hash{"$Sdatabase"} -> ' . $Sdatabase . ' -> ' . $hash{"$Sdatabase"} . "\n"; exit; [root@itx2 ~]# perl x8.pl $hash{"$Sdatabase"} -> /opt/asd/sql/dbi-indexed-GeoLite2.db-sqlite-old -> DBI::db=HASH(0x562a9cb92f50) $hash{"$Sdatabase"} -> /opt/asd/sql/dbi-indexed-GeoLite2.db-sqlite-old -> DBI::db=HASH(0x562a9c858f60) $hash{"$Sdatabase"} -> /opt/asd/sql/dbi-indexed-GeoLite2.db-sqlite-old -> DBI::db=HASH(0x562a9c8593c8) [root@itx2 ~]#