Ok, I'm trying to port over a mod I used with my Links 2.0 installation. My Links table features a "Language" column with multiple values: "en" for English", "ja" for Japanese and so forth. I tried to create a global called "langimg" that allows to display country flags for each language selected. Something along the following lines:
my ($rec) = @_;
if ($rec->{'Language'} eq 'en') {$lang_img = qq|<img src="/images/en.gif" border="0" alt="English"> |;}
if ($rec->{'Language'} eq 'ja') {$lang_img = qq|<img src="/images/ja.gif" border="0" alt="Japanese"> |;}
etc.
So far I only received the following error msgs: "Unable to compile 'langimg'".
I'd appreciate any help.
Code:
sub { my ($rec) = @_;
if ($rec->{'Language'} eq 'en') {$lang_img = qq|<img src="/images/en.gif" border="0" alt="English"> |;}
if ($rec->{'Language'} eq 'ja') {$lang_img = qq|<img src="/images/ja.gif" border="0" alt="Japanese"> |;}
etc.
So far I only received the following error msgs: "Unable to compile 'langimg'".

I'd appreciate any help.