$VAR1 = [ { 'name' => 'item1' }, { 'name' => 'item2' } ]; $ref->{'items'} is ARRAY item1 is HASH item2 is HASH Need an an array of hashes input to create CSV from at /usr/local/share/perl/5.22.1/Text/CSV/Slurp.pm line 53.