#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
open (VIS,"grandvisits.txt");
$ha=<VIS>;
close VIS;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
$combonation="$mday-$mon-$year";
@sp=split(/\¦/,$ha);
if(@sp[0]!="$combonation")
{
open (VIOB,">grandvisits.txt");
print VIOB "1";
close VIOB;
}
else{
$he=@sp[0]+1;
open (VIOS,">grandvisits.txt");
print VIOS "$combonation\¦$he";
close VIOS;
}
@array[0] should be written as $array[0], etc.
I don't know why there is a comma in your split statement.
If you place use strict; at the top, your compiler may provide other clues. It will also require all vars to be declared either locally or globally.
Incidentally, stating that something doesn't work is not helpful. If you want help with a problem, you should state the exact nature of the fault.
Kaled.