my %attributes = grep { length } map { m/^(?:attribute|value): (.*)$/ and $1 } ;