my @files = <../data/text/*.txt>; my @display_files = map /([^\/]+)\.txt/, @files; Encode::from_to($_, "ISO-8859-7", "utf8") for @display_files; print br; print start_form( action=>'index.pl' ); print h1( {class=>'lime'}, "Επέλεξε το κείμενο που σε ενδιαφέρει => ", popup_menu( -name=>'select', -values=>\@display_files ), submit('Εμφάνιση')); print end_form; my $passage = param('select') || "Αρχική Σελίδα!"; Encode::from_to($passage, "utf8", "ISO-8859-7") if param(); if ( param('select') ) { open(FILE, "<../data/text/$passage.txt") or die $!; ..... #### use POSIX qw(strftime); use Encode; print header( -charset=>'utf8' ); print start_html( -style=>'/data/css/style.css', -title=>'Ψυχωφελή Πνευματικά Κείμενα!' ); my ($select, $row, $data); my $date = strftime('%y-%m-%d %H:%M:%S', localtime); my $display_date = strftime('%a %d %b, %I:%M %p', localtime); Encode::from_to($display_date, 'ISO-8859-7', 'utf8'); my $host = gethostbyaddr (pack ("C4", split (/\./, $ENV{'REMOTE_ADDR'})), 2) || $ENV{REMOTE_ADDR}; $host = "Νίκος" if ( ($host =~ /dell/) or ($host =~ /dsldevice/) or ($host =~ /localhost/) );