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