in reply to Help with an IF?

Perl is not PHP, Perl has different comparison operators for strings and for numbers. That is because Perl doesn't really let you distinguish between whether a value is a string or a number. So, is "0" == "00"? Perl resolves that ambiguity by explicitely making you treat the scalars as strings, or as numbers. == is for numbers, eq is for strings. See perlop.

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"; } ...