Re: Perfecting index.pl some more!



Nikos wrote:

Also maybe thre is a better wau to create the $data variable instead of constant concatenations as i have it.

You mean like where you say:

         $data = "Charset I lack " .$host. "! more stuff";

Well it's more ideomatic to use interpolation:

         $data = "Charset I lack $host! more stuff";

        $sth = $dbh->prepare( $sql{update_visitor} );
        $sth->execute($host);

Since you don't use that statment handle again after the execute() you may want to condisder the shorthand form:


      $dbh->do( $sql{update_visitor}, {}, $host);

    else
    {
        if ($host ne "Íßêïò")
        {

You may want to consider elsif (that's not a typo, there really is no 'e' in Perl's spelling of 'elseif').


.