my ( $key, @data ); while ( ) { if ( /^([^:]+):/ ) { push @data, $_; } else { $data[ -1 ] .= $_; } }