#!/usr/bin/perl
print "Content-type: text/html\r\n\r\n";
### Generate some numbers.
$now = time();
$nill = time() + 50;
$null = time() + 100;
### Then print to prove that worked
print "
Line one from mixed.data = $now";
print "
Line two from mixed.data = $nill";
print "
Line three from mixed.data = $null";
### Fine -- So now I make an array
@scale = ($now,$nill,$null);
### And print to prove that works
print "
Print Array = @scale";
### Fine
### Then I overwrite mixed.data with
$data_path = "data/mixed.data";
open(O, ">$data_path");
print O join("\n",@scale),"\n";
close(O);
####
#!/usr/bin/perl
print "Content-type: text/html\r\n\r\n";
### First I read from database.
$data_path = "data/mixed.data";
open(DAT, $data_path) || die("Could not open file!");
@rawdata=;
close(DAT);
$now = $rawdata[0];
$nill = $rawdata[1];
$null = $rawdata[2];
### Then print to prove that worked
print "
Line one from mixed.data = $now";
print "
Line two from mixed.data = $nill";
print "
Line three from mixed.data = $null";
### Fine so far-- So now I make an array
@scale = ($now,$nill,$null);
### And print to prove that works
print "
Print Array = @scale";
### This results in browser.
#-----------------------------------
# Line one from mixed.data = FAST
# Line two from mixed.data = FASTER
# Line three from mixed.data = FASTEST
# Printed from Array = FAST FASTER FASTEST
#------------------------------------
### Which is all very fine so far.
### Then I overwrite mixed.data with
$data_path = "data/mixed.data";
open(O, ">$data_path");
print O join("\n",@scale),"\n";
close(O);