in reply to different output from gzwrite

When interpolated into a string, and array has it's elements seperated by $", which by default is a space, so your string ends up looking like "ford mustang 2003\n toyota landcruiser 1990....". Try using
{ local $" = ""; $gz->gzwrite("@{$hash_name{$hash_data}}"); }
which will set $" to the empty string, which will then be put between each element.