Microsoft
Software
Hardware
Network
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
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=HAS
H(0x81a604
0)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
Answer : Get Param from File not via post get method
Small correction
if ($doe lt $date)
should be
if ($doe < $date)
Random Solutions
How do I prevent that somebody steals my pictures ?
How to recover from partition table out of sync
Metafile Logo indicates file attachment in XP Pro Outlook 2003.
How can I fix the error lsasse.exe - unable to locate component
Sybase SQL Data Recovery
Vista freezes after 4 minutes -logon process has failed to create the security options dialogue
How to close an open relay on Sendmail?
Best domain registering
perl Test::Harness - FAILED--no tests were run for some reason
what is the limit creating a directory recursively in Windows XP?