in reply to Re^2: Undef value in Template Toolkit
in thread Undef value in Template Toolkit

This seems to be some intermediate or side effect goal to me. TT's output is a string, so for that purpose undef and the empty string are equivalent. Maybe you have something like [% IF hashref.defined('value1') %]...[% END %] later on, or you want to pass a value back to the Perl code which called TT's process? For these situations you can [% hashref.delete('value1') %] which should do the trick unless you also need to distinguish between keys which exist from keys with an undefined value.

Replies are listed 'Best First'.
Re^4: Undef value in Template Toolkit
by DreamT (Pilgrim) on Aug 21, 2019 at 07:15 UTC
    Yes, I'm basically using TT as a field mapper (se my other reply in this thread), i.e. " pass a value back to the Perl code".
    And I need to distinguish between existing/undefined.