in reply to grep and array

try (untested):

my $hold = join(' ', @hold2);

Then use $hold instead of @hold2

`egrep -wn  $hold nbsssbs//esel/bld/*.bld nbsssbs/sbc/bld/*.bld nbssbts/btsc/bld/*.bld > $temp/otherblds2.txt `;