barrycarlyon has asked for the wisdom of the Perl Monks concerning the following question:
In the node Help with an IF?, I was told about this:
my $title = 'Political Animal'; # Or in your case, $q->param('title') my %links_to = ( "Political Animal" => "pa", "Newslink" => "nl", "New Slang" => "ns", "Rant With Ryan" => "rwr", "Planet Venus" => "pv", "All Day Breakfast" => "adb", ); my $link = $links_to{$title};
Upon trying something similar but with:
my %DAYS_OF_WEEK = ("0" => "Sunday", "1" => "Monday", "2" => "Tuesday", "3" => "Wednesday", "4" => "Thursday", "5" => "Friday", "6" => "Saturday", ); my $dayname = $DAYS_OF_WEEK($day);
Where $day is obtained using Class::Date (well locatine time actually)
It generates a 500 Internal Server Error, what am I doing wrong?
Yours Hopefully
2006-04-27 Retitled by g0n, as per Monastery guidelines
Original title: 'SOLVED Help with an array Conversion'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with an array Conversion
by Paladin (Vicar) on Apr 26, 2006 at 21:31 UTC | |
|
Re: Help with an array Conversion
by Zaxo (Archbishop) on Apr 26, 2006 at 21:32 UTC | |
by barrycarlyon (Beadle) on Apr 26, 2006 at 21:42 UTC | |
by Zaxo (Archbishop) on Apr 26, 2006 at 21:54 UTC | |
|
Re: Help with an array Conversion
by ikegami (Patriarch) on Apr 26, 2006 at 22:06 UTC | |
by barrycarlyon (Beadle) on Apr 26, 2006 at 22:10 UTC | |
by ikegami (Patriarch) on Apr 26, 2006 at 22:16 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |