Test 0 chunk_ref $VAR1 = [ { 'baz' => 'qux', 'foo' => 'bar' } ]; chunk $VAR1 = { 'baz' => 'qux', 'foo' => 'bar' }; chunk_ref $VAR1 = [ { 'baz' => 'bar', 'foo' => 'qux' } ]; chunk $VAR1 = { 'baz' => 'bar', 'foo' => 'qux' }; 0 : $VAR1 = [ 'bar', 'qux' ]; Test 1 chunk_ref $VAR1 = { 'baz' => 'qux' }; Not an ARRAY reference at /tmp/mce.pl line 20, <__ANONIO__> line 3. chunk_ref $VAR1 = { 'foo' => 'bar' }; Not an ARRAY reference at /tmp/mce.pl line 20, <__ANONIO__> line 5. 1 : $VAR1 = [];