thanks a lot guys...
i was not aware that the last element of an array would consume the hash reference. (thanks linuxer)
i have swaped the location of the array with that of the hash for now, but the suggestions from bichonfrise and johngg is cleaner and does not interfere with what i am trying to do...
thanks again.