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
Barry Carlyon
barry@barrycarlyon.co.uk
2006-04-27 Retitled by g0n, as per Monastery guidelines
Original title: 'SOLVED Help with an array Conversion'
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.