for my $content (qw(name last_login)) { $tree->look_down('tal:content' => $content) ->replace_content($hash->{user}{$content}); }