in reply to Problems with 'strict' and variables created on the fly
This is a lot more practical than having legions of separate variables.my %data; foreach my $line (@data) { my ($timestamp, $page, $moredata) = split('|', $line); my @hits = localtime($timestamp); $data{$page} = [0,0,0,0]; $data{$page}[0]++ if ($hits[7] == $now[7]); # ... (etc) }
|
|---|