in reply to Help with an IF?
Oh, and you have one more major problem: you're declaring your $link variables every time inside the code blocks. That limits their scope to that block, so there's no way you can access these variables outside those blocks. What you have, is a bunch of independent variables all called $link.
What you need is one declaration, at the top. You have that. Just drop the my on every other line that refers to $link. Like this:
my $link = "err"; if ($q->param('title') eq "Political Animal") { $link = "pa"; } ...
|
|---|