networkwoes
Technical User
I am trying to create a file called CSCH.CSV on a daily bases and want to include the date in the file name so that it would look like CSCH 20011129.csv but have been unsuccesfull in doing so. I have the date stored as a variable and am able to print it fine. However when I try to create a file using the variable as part of the file name, the file that is created uses the variables name rather than its value. Here is the code i am useing:
($ss, $mm, $hh, $DD, $MM, $YYYY, $wday, $yday, $isdst) = localtime(time);
$Year = $YYYY + 1900;
$Month = $MM + 1;
$DateStamp = "$Year$Month$DD";
print "DateStamp\n";
open( OUTFILE, '>G:\Automation\Daily CSCH Report\csch$DateStamp.csv') or die "Can't open the csch(date) out file $!\n";
Also I am getting an warning line that like this:
Name "main::ss" used only once
for each of the variables that I invoked for the localtime, but did not need for anything... any ideas how to fix these things? all help would be greatly appreciated!!!
($ss, $mm, $hh, $DD, $MM, $YYYY, $wday, $yday, $isdst) = localtime(time);
$Year = $YYYY + 1900;
$Month = $MM + 1;
$DateStamp = "$Year$Month$DD";
print "DateStamp\n";
open( OUTFILE, '>G:\Automation\Daily CSCH Report\csch$DateStamp.csv') or die "Can't open the csch(date) out file $!\n";
Also I am getting an warning line that like this:
Name "main::ss" used only once
for each of the variables that I invoked for the localtime, but did not need for anything... any ideas how to fix these things? all help would be greatly appreciated!!!