in reply to Hash problem

If I am understanding right you want to create a Hash of arrays with $a as key and (from here I am not quite sure) $b, $c, $d pushed into @bex as the array of $a. Is that right?
Well than please use first use strict; and use warnings; so any problems perl can detect are eliminated.
Then you test if $Tex{$a} is undef in order not to override? But you test just if the value of that key is undefined. Test with exists($Tex{$a}) if you want not to override. Then if you want to add an array although only scalars can be stored into a hash element you will need references. Something like it has beed suggested or: @{$Tex{$a}} = @bex (whatever this @bex is).

Asuming you tested that $a and @bex are ok ...
unless(exists($Tex{$a})) { @{$Tex{$a}} = @bex; }