in reply to Re^4: 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

I have not included that in the code, however, when i do a export hi='' i'd expect the code to display 'undefined value' against the key hi.But it doesn't not sure why.
  • Comment on Re^5: not able to make defined-or operator work in my code

Replies are listed 'Best First'.
Re^6: not able to make defined-or operator work in my code
by Anonymous Monk on Feb 11, 2015 at 01:52 UTC

    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?