in reply to Assign a hash to an array

Hi ravi45722,

I was just about to post asking what you want your output to look like, but you just edited your post to add the expected output. Have a look at How do I change/delete my post?, especially "It is uncool to update a node in a way that renders replies confusing or meaningless".

In addition to what others have said about your creation of the data structure, regarding your expected output: Interestingly, your code does produce the output you expect:

$VAR1 = [ 'term', { 'column08' => 'Submit' }, 'term', { 'column10' => 'Delivered' }, 'term', { 'column09' => 'Something' } ];

This is equivalent to your expected output, which uses the arrow operator (aka "fat comma") after 'term'. But because @return_array is an array and not a hash, I'm pretty sure you'll never get Data::Dumper to output the fat comma between some of its elements. Are you confusing an array and a hash? Maybe you could show how you later want to look things up in @return_array? Also you'll probably want to review perlreftut and perldsc in detail.

Hope this helps,
-- Hauke D