in reply to Re: Chronologically sort a DBM DB into an array?
in thread Chronologically sort a DBM DB into an array?

Well, so far all I've got is this...


use CGI qw(:standard); dbmopen(my %NEWS, "news", 0644) #opening the db or die("Error opening news database: $!"); open(TEMPLATE,"newstemp.html"); #opening the template while(<TEMPLATE>) { #reading it in $temp .= $_; } close TEMPLATE;



And then later on...

$temp =~ s/\[\%1\%\]/$news1/; $temp =~ s/\[\%2\%\]/$news2/; print header(); print "$temp";


However, I don't know exactly how I'm supposed to get the entries from the DBM into the array. After that, it's just a simple matter of setting $news1 to $NEWS[0], and $news2 to $NEWS1. I've encountered a stumbling point with the array and sorting though, and have no idea exactly how to do it.




and on the age thing, thanks. It took lots of hard work, and more spare time than should be legally possible.