The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.


Sdict - Module to work with Sdictionary .dct files


        use Sdict;

    # File compilation/decompilation
        $Sdict::debug = 1;

        $sd = Sdict->new;





    # Working with .dct
        $sd = Sdict->new;

        $sd->debug_on; # or $sd->debug_off;

        $sd->init ( { file => 'test.dct' } );

    # Load dictionary
        unless ($sd->load_dictionary_fast) {
            die 'Unable load dictionary';

    # Locate word
        my $article = $sd->search_word ('fox');
        print "translation is '$article'\n" if $article;

    # Unload dictionary

    # If you are interested about header only
        unless ($sd->read_header) {
            die 'Unable to load dictionary';

        warn "found '$sd->{header}->{title}'";

    # Information about dictionary
        $title = $sd->{header}->{title};
        $copyright = $sd->{header}->{copyright};
        $word_lang = $sd->{header}->{w_lang};
        $article_lang = $sd->{header}->{a_lang};
        $version = $sd->{header}->{version};
        $words_total = $sd->{header}->{words_total};

    # Print info

    # Get words from current position
        for (my $i=0; $i < SDICT_LOAD_ITEMS; $i++) {

                $word = $sd->get_next_word;
                $word = decode ("utf8", $word);

                last if ($curWord eq q{}); # Last word reached

                warn "word '$word'";


        $pos = $sd->{f_index_pos_cur};

    # Get previous word
        $word = $sd->get_prev_word;

    # Get article you stay on
        $article = $sd->read_unit($sd->{cur_word_pos} + $sd->{articles_pos});


The Sdict module was written by Alexey Semenoff, as part of Sdictionary project. The project homepage is


See the Changes file.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 3273:

=cut found outside a pod block. Skipping to next block.