#! perl -slw use 5.010; use strict; use Inline C => Config => BUILD_NOISY => 1; use Inline C => <<'END_C', NAME => 'uCmp', CLEAN_AFTER_BUILD => 0; bool uCmp( SV* t ) { return (bool)( t == (&PL_sv_undef) ); } END_C print 'explicit undef: ', uCmp( undef ) ? 1 : 0; print '`foo`: ', uCmp( scalar(`foo`) ) ? 1 : 0; __END__ explicit undef: 1 Can't exec "foo": No such file or directory at a.pl line 14. `foo`: 1