in reply to Re: Chronologically sort a DBM DB into an array?
in thread Chronologically sort a DBM DB into an array?
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;
$temp =~ s/\[\%1\%\]/$news1/; $temp =~ s/\[\%2\%\]/$news2/; print header(); print "$temp";
|
|---|