foreach my $my_line (@lines) { my ($month, $day, $time, $user, $ip, $file, $size, $speed) = split / /, $my_line; print .... }