Whats meant by "match the numbers before the decimal point"?
One way could involve to 'int-ify' all comparisons:
...
for my $element (@array2) {
my ($num, $txt) = split /#/, $element; # extract parts
print "$txt = ". int($num) ."\n"
if grep int($num) eq int($_), @array1 # use text comparison and
+ print txt part
}
...
But I'm not entirely sure what you are trying to do.
Regards
mwa |