foreach (@lines) { $_ =` /\[([^]]+)\] \[([^]]+)\] \[([^]]+)\] (.*)/ || next my ($part1,$part2,$part3) = ($1,$2,$4);