Cheers everyone,
I am working on a script that fiqures out wheter or not to update and what text to update on a web page. I thought this would be simple bu it is not I am having problems.
The script iterates through a directory storing the real filenames in a variable named @found_files.
T I thought the best way was to compare the seconds from the stat()0 function. But I cant seem to even get that to work. I keep getting hexadecimal values.
In the begining
Let us first assume that there was nothing to begin with.
I am working on a script that fiqures out wheter or not to update and what text to update on a web page. I thought this would be simple bu it is not I am having problems.
The script iterates through a directory storing the real filenames in a variable named @found_files.
T I thought the best way was to compare the seconds from the stat()0 function. But I cant seem to even get that to work. I keep getting hexadecimal values.
Code:
@filenames ="fileone.shtml,filetwo.shtml";
foreach my $file (@filenames) {
next if $file eq'.';
next if $file eq'..';
$X++;
push @found_files, $file;
};
foreach my $item (@found_files){
@tmp = localtime($item);
($seconds, $minutes, $hours, $day_of_month, $month, $year, $wday, $yday, $isdst) = localtime($tmp[0]);
print "The file is $item $seconds<BR>";
};
Let us first assume that there was nothing to begin with.