W
Wijnand Nijs
Hello,
I get a lot of "uninitialized value" errors in my logfile. The script is working fine but I don't like errors I don't understand. Ok, if there are no form params, I understand that $Year en $Month are empty. Is there a nice way to give $Year and $Month a value if there are no form params without an error message in the log fiale?
Thanks and regards...
Wijnand
Use of uninitialized value in string eq at G:/cgi-bin/calendar/calendar.pl line 35.
14 # get form params
15 #-----------------
16
17 $Year = param("Year");
18 $Month = param("Month");
19
20
21 # convert localtime
22 #-------------------
23
24 $HourOffset = 0;
25
26 $time = time;
27 ($local_monthday,$local_month,$local_year) = (localtime($time+($HourOffset*3600)))[3,4,5];
28 $local_month = $local_month + 1;
29 $local_year = $local_year + 1900;
30
31
32 # check form params
33 #-------------------
34
35 if ($Year eq "") {
36 $Year = $local_year;
37 };
I get a lot of "uninitialized value" errors in my logfile. The script is working fine but I don't like errors I don't understand. Ok, if there are no form params, I understand that $Year en $Month are empty. Is there a nice way to give $Year and $Month a value if there are no form params without an error message in the log fiale?
Thanks and regards...
Wijnand
Use of uninitialized value in string eq at G:/cgi-bin/calendar/calendar.pl line 35.
14 # get form params
15 #-----------------
16
17 $Year = param("Year");
18 $Month = param("Month");
19
20
21 # convert localtime
22 #-------------------
23
24 $HourOffset = 0;
25
26 $time = time;
27 ($local_monthday,$local_month,$local_year) = (localtime($time+($HourOffset*3600)))[3,4,5];
28 $local_month = $local_month + 1;
29 $local_year = $local_year + 1900;
30
31
32 # check form params
33 #-------------------
34
35 if ($Year eq "") {
36 $Year = $local_year;
37 };