my ($word, $pos, $attrs) = $line =~ /^(\w+)\s+\[(\w+)\s+(.*)\]/; my %attrs = map m/(\w+)=(\w+)/, split /\s+/, $attrs;