I guess that it is probably the exponentiation that slows you down (as bart remarked). The easiest thing I can think of would be to hardcode the powers of 256 in a separate array. So the loop would become:
my @factors = (1, 256, 65536, ...);
foreach my $a (@array) {
$result += $a * $factors[$count++];
}