#!/usr/bin/perl
$var=`cal`;
@days=split(/\s+/, $var);
$removed=shift(@days);
$month=shift(@days);
$year=shift(@days);
$removed3=shift(@days);
$removed4=shift(@days);
$removed5=shift(@days);
$removed6=shift(@days);
$removed7=shift(@days);
$removed8=shift(@days);
$removed9=shift(@days);
foreach $day (@days) {
open(DATA, ">> /cgi-bin/cgi-date/$month$day-$year"
;
print DATA "$month , $date , $year\n";
close(DATA);
}
Can someone tell me why my foreach loop is not working? Or any ideas on how to make it work.
-Danny
techie@snoboarder.net
$var=`cal`;
@days=split(/\s+/, $var);
$removed=shift(@days);
$month=shift(@days);
$year=shift(@days);
$removed3=shift(@days);
$removed4=shift(@days);
$removed5=shift(@days);
$removed6=shift(@days);
$removed7=shift(@days);
$removed8=shift(@days);
$removed9=shift(@days);
foreach $day (@days) {
open(DATA, ">> /cgi-bin/cgi-date/$month$day-$year"
print DATA "$month , $date , $year\n";
close(DATA);
}
Can someone tell me why my foreach loop is not working? Or any ideas on how to make it work.
-Danny
techie@snoboarder.net