I'm not sure I understand what you are trying to ask...
However, if I do understand correctally...
If you have a variable in one namespace (package) and you want to get at it from another, you need to use a format similar to $package::variable
In your case, I believe you need to use %main::hash1 to acess your hash that was declared within x.pl, from the package X.
It is prefixed with main because that is the default namespace/package for any program unless another is declared with a
package statement.
"Weird things happen, get used to it"
Flame ~ Lead Programmer: GMS
http://gms.uoe.org