in reply to single line if conditional

A checkbox should just be true or false. You should just be able to say:
$hash{name} = "this and that" if param('name');
What you have should work though, so I'd check what $name is set to.