And My Code That Don't Work

use strict;
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
use CGI;
my $basedir = '/home/users/v10/events';

my $cgi = new CGI;
my @files = sort glob("$basedir/*.evt");

foreach (@files){
    open(IN,"<", $_) or die "Could not open $_: $!\n";
my $query = new CGI($_);
my $passedyet = $query->param("doe");
    print $query . $passedyet; # see results on page
if ($passedyet gt $datey){rename ($_, $_ . $old)};  

close(IN);
}

What I Get Back From The Print
CGI=HASH(0x81c4354)CGI=HASH(0x81a6040)CGI=HASH(0x81a60f4)
and $passedyet seems to be nothing at all

$datey will be the date in yyyymmdd format once I have worked out how to get it and put in the leading 0's on single number days and months

Question : Get Param from File not via post get method

I am having a bad day today, lol...
Scope of what I am trying to do.

I have lots of files called yyyymmdd.evt (you can guess what the letter represent)
Problems
1. I need to firstly get the current date from the server not client side
2. Open each file in an array and get a param("doe")
3. if value from param is older that current date, rename file by added "-old" to the end of extsion.

Example of a yyyymmdd.evt file follows.

   
   

 15/2/08
        Floater Open Yarmouth
 

Answer : Get Param from File not via post get method

Small correction

if ($doe lt $date)

should be

if ($doe < $date)
Random Solutions  
 
programming4us programming4us