PostgreSQL pl/perl trigger, differentiate null vs empty
You did not specify PostgreSQL version. On 9.0.5 I have observed the same behavior (not sure if it's a bug, see comments below).

This is easy to workaround - you can first test for definedness to catch NULL, and if it passed, test for empty string. 

if ( not defined $_TD-&gt;{ new }{ $column } ) {
    elog( NOTICE, "New value in column $column is not defined" );
}
elsif ( $_TD-&gt;{ new }{ $column } eq '' ) {
    elog( NOTICE, "New value in column $column is empty" );
}
if ( not defined $_TD-&gt;{ old }{ $column } ) {
    elog( NOTICE, "Old value in column $column is not defined" );
}
elsif ( $_TD-&gt;{ old }{ $column } eq '' ) {
    elog( NOTICE, "Old value in column $column is empty" );
}