Hi,

Right now I have:

sub add{
        my($htmldata) = loadfile($investorfile);
        my($code) = time;

        if ($read{'day'} eq ''){
                $date = "$read{'month'} $read{'year'}";
        } else {
                $date = "$read{'month'} $read{'day'}, $read{'year'}";
        }

        $newdata=<<"End_Of_NewData";
<!--$code:begin-->
                <tr>
                        <td bgcolor="#336699" valign="top"><font
face="Arial, Helvetica, sans-serif" size="3"
color="#FFFFFF"><b><!--location:begin-->$read{'location'}<!--location:end--></b></font></td>

                </tr>
                <tr>
                        <td colspan="2" valign="top"><br><p><font
size="3" face="Arial, Helvetica,
sans-serif"><!--heading:begin-->$read{'heading'}<!--heading:end--><br><!--date:begin-->$date<!--date:end--></font><br><br></td>

                </tr>
<!--$code:end-->
<!--end-->
End_Of_NewData

        $htmldata =~ s/<!--end-->/$newdata/i;
        &savefile($investorfile, $htmldata);


What I want to do is sort this data by date; so the most recent event
occurs first. What is is the best way to sort and add to this data,
while checking for date?

Any suggestions?

Thanks,

Erena

Reply via email to