in reply to Help with an IF?

Firstly, "==" is numeric comparison - use "eq" for string comparison. I'm also assuming that title isn't "Polictical Animal", which is never going to match "Political Animal", however you handle the comparison... ;)

As an extra, this looks like a messy way to handle this sort of case.

Try (untested):

%linkhash = ( 'Political Animal' => 'pa', 'Newslink' => 'nw' ); if(defined $linkhash{$q->param('title')}){ $link = $linkhash{$q->param('title')}; } else{ $link = 'err'; }
Tom Melly, tom@tomandlu.co.uk