#!/usr/bin/perl use POSIX qw(locale_h); use DBI; use CGI qw/:standard/; use CGI::Cookie; use Template; use OpenDict::WebUtils; use utf8; setlocale(LC_CTYPE, "pt_PT.utf8"); setlocale(LC_COLLATE, "pt_PT.utf8"); # This prints CGI header! my $DA = new OpenDict::WebUtils(query => '/search'); my $filename = $DA->{pathinfo}; open F, "$DA->{root}/htmls/$filename"; binmode(F, ":encoding(utf8)"); print while(); $DA->TT->process('footer');