in reply to RE: not able to make defined-or operator work in my code

I guess it might have to do with the keys and values of %ENV being stringified, so perhaps that's why you're not seeing undef. A different criteria you could use might be $value = 'empty value' unless length $value;

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

      I don't see the OP assigning to %ENV. Are you able to get undefs from your environment? I'm genuinely curious, since I haven't yet been able to.

        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.