I keep getting the following errors everytime I call my get_prevday
subroutine which is at the bottom. I have initialized all the variables in the program that I can think of. Please help!!:
"Use of uninitialized value in array element at
Thickness_vs5.cgi line 542. <FILE> line 71. "
"Use of uninitialized value in array element at
Thickness_vs5.cgi line 543. <FILE> line 71. "
.
.
my @date, $m, $md, $y, $epochtime;
$date[$x]= get_prevday($date[$x]);
.
.
.
###################Subroutines ###################
LINE 542 ->sub get_prevday { $date[$x] = shift || return(0);
LINE 543 ->($m,$md,$y) = $date[$x] =~ m|(\d+)/(\d+)/(\d+)|;
$epochtime = timelocal_nocheck(0, 0, 0, $md-1, $m-1, $y);
return strftime("%m/%d/20%y",0,0,0,(localtime($epochtime))[3,4,5]);}