$btn1=$mw->Button(-text=>"Open",-width=>5,-height=>2,-command=>\&open_port) ->place(-relx=>0.05,-rely=>0.25); $btn2=$mw->Button(-text=>"Close",-width=>5,-height=>2,-command=>\&close_port) ->place(-relx=>0.15,-rely=>0.25);