Should be $hnick, not $hopnick, and you'll need a | after the first } in both code blocks.