*** a/src/pl/plperl/plperl.c
--- b/src/pl/plperl/plperl.c
***************
*** 1357,1363 **** make_array_ref(plperl_array_info *info, int first, int last)
  	for (i = first; i < last; i++)
  	{
  		if (info->nulls[i])
! 			av_push(result, &PL_sv_undef);
  		else
  		{
  			Datum		itemvalue = info->elements[i];
--- 1357,1366 ----
  	for (i = first; i < last; i++)
  	{
  		if (info->nulls[i])
! 		{
! 			/* We cant use &PL_sv_undef here... see perlguts */
! 			av_push(result, newSV(0));
! 		}
  		else
  		{
  			Datum		itemvalue = info->elements[i];
***************
*** 2639,2646 **** plperl_hash_from_tuple(HeapTuple tuple, TupleDesc tupdesc)
  
  		if (isnull)
  		{
! 			/* Store (attname => undef) and move on. */
! 			hv_store_string(hv, attname, &PL_sv_undef);
  			continue;
  		}
  
--- 2642,2652 ----
  
  		if (isnull)
  		{
! 			/*
! 			 * Store (attname => undef) and move on. Note, we cant use
! 			 * &PL_sv_undef here... see perlguts for more
! 			 */
! 			hv_store_string(hv, attname, newSV(0));
  			continue;
  		}
  