in reply to array or hash reference

When you are not sure about the data structure you are creating use Data::Dumper to document it for you:
use strict; use Data::Dumper; my $key = 4711; my $value = "fubar"; my @jobs; push @jobs, {$key=>$value}; print Dumper \@jobs; ___OUTPUT___ $VAR1 = [ { 4711 => 'fubar' } ];

pelagic