try replace your while loop with the following:
while(){
chop;
@line = split(/\|/);
next unless(substr($line[0], 0, 8) eq $selectedDate);
push(@display,{'displayDate'=>$line[0],
'pageViwed'=>$line[1],
'ip'=>$line[2],
Hello,
I am teaching myself perl. I have become stuck. My script is designed to
write, read and display log files. I am having a hard time getting the
correct data from the log file to a template file. My code will match the
correct lines in the log file but when I pass it to the template it disp