in reply to Uninitialized value and a dot between $schema and $table

$schema and $table don't have values (i.e., they are undefined.)

Make sure to give them valid values before calling the create_table() function

when I add $schema = "public", and $table = "tempt", your code just works for me.

( By the way, you probably want text, not char(). )

(Oh, and $databas should be $database)