use strict; use warnings; $|=1; sub empty_list { @{ [] } } sub use_hash { my (%h) = @_; print(join(',',keys %h),"\n"); } use_hash(foo1 => undef, bar1 => 5); print "not defined\n" unless defined ((empty_list)[0]); use_hash(foo2 => (empty_list)[0], bar2 => 5); #### bar1,foo1 not defined Odd number of elements in hash assignment at C:\tmp\emptylist_a.pl line 12. foo2,5