in reply to If statement wont branch

I don't know if it has anything to do with line 47, but you'll want to add a $ sign to "param" on the lines giving you errors, e.g.
my $writer = $param{'writer'}; my $title = $param{'title'}; my $text = $param{'text'}; my $current = $param{'current'};
Update: Whoops, you're not trying to use a hash after all. I should look before I leap. See the answers below.

-- Mike

--
just,my${.02}