#!/usr/bin/perl -C #use utf8; use DBI; $dbh = DBI->connect('DBI:mysql:database=*****;host=localhost;port=3306','*****','*****'); $dbh->do('SET NAMES utf8'); $sth = $dbh->prepare("select * from towns where town like \"Mali Lo%\""); $sth->execute; $p = $sth->fetchrow_hashref; $town = $p->{town}; print "Content-type: text/html\n\n"; print $town; $town1 = $town2 = $town3 = $town4 = $town5 = $town6 = $town; $town1 =~ tr/Š/s/; print "1($town1)"; $town2 =~ tr/š/s/; print "2($town2)"; $town3 =~ tr/Šš/ss/; print "3($town3)"; $town4 =~ s/š/s/g; print "4($town4)"; $town5 =~ s/Š/s/g; print "5($town5)"; $town6 =~ s/[Šš]/s/g; print "6($town6)";