in reply to Re^5: not able to make defined-or operator work in my code
in thread RE: not able to make defined-or operator work in my code

But export hi='' is an empty string, and in Perl, there is a difference between an empty string and undef (the latter can be thought of as the absence of a value, kind of like NULL in other languages). Defined-or tests for undef, hence the above recommendation to test with length.

Did you try looking at %ENV with Data::Dump or Data::Dumper, as was recommended above?