my @files = <../data/text/*.txt>; my @display_files = map /([^\/]+)\.txt/, @files; Encode::from_to($_, "ISO-8859-7", "utf8") for @display_files; #1st conversion in order to appear correctly in the popup menu 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(); #2nd conversion in order for the user selected file from the popup menu to be able to be opened if ( param('select') ) { open(FILE, "<../data/text/$passage.txt") or die $!; local $/; $data = ; close(FILE); Encode::from_to($passage, "ISO-8859-7", "utf8"); #3nd conversion in order for the user selected file from the popup menu to be able to be inserted as "UTF8" in the database. $select = $dbh->prepare( "UPDATE guestlog SET passage=?, date=?, counter=counter+1 WHERE host=?" ); $select->execute( $passage, $date, $host ); } else more code