foreach my $line ( split( /\n/, $c ) ) { my %lag_detail; ...