in reply to Re^2: Assignment to a value only if it is definedin thread Assignment to a value only if it is defined
{local $_ = $bar; $foo = $_ if defined $_;}
$foo = $_ for grep defined, expensive(); [download]