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
PDFCreator not showing dialog box
Truncate a Log File
Finding group id from PID
EHLO with a 500
Websphere Portal vs SharePoint 2007
Bad file number error after writing 127 text files
How do I Fix a RUNDLL Error
How do I Create new SharePoint server farm Database on different drive on same server
How to set Windows Explorer View settings always to 'Details'?
Citrix SSL relay name could not be resolved