use Data::Dumper;

while(<>) {
    if(/^(.{10}) (.{8}) (.{41}) (.+)/) {
	my $this = {
	    cmavo => $1,
	    family => $2,
	    shortdef => $3,
	    def => $4
	    };
	foreach my $key ('cmavo','family','shortdef','def') {
	    $this->{$key} =~ s/^\s+//;
	    $this->{$key} =~ s/\s+$//;
	}
	push @list, $this;
    }
}

open(FOO,">cmavo.pl");
print FOO Dumper(\@list);
print FOO "1;\n";
close(FOO);
