#!/bin/perl5 use strict; use warnings; use DBM::Deep; #use Net::FTP; my $words_all = { expletive => [1060], agong => [1542], measles => [qw(1459 415 1497)], proven => [qw(833 119 208)], sexta => [qw(517)], kosovar => [qw(33 35 28 44)], }; my %pack; while (my ($word, $url_list) = each %{$words_all}){ my $url_list_packed = pack 'v*', @{$url_list}; $pack{$word} = $url_list_packed; } my $file = 'data/word.db'; unlink $file if -e $file; my $db = DBM::Deep->new(file => $file); eval{ $db->import(\%pack); }; die $@ if $@;