my (@frames,@button); my %sub_of = ( "Log query" => \&push_button2 , "SMS query" => \&push_button3 , "VIEW DISK" => \&push_button4 , 4 => sub{ print "program 4" }, 5 => sub{ print "program 5" }, 6 => sub{ print "program 6" }, 7 => sub{ print "program 7" }, 8 => sub{ print "program 8" }, 9 => sub{ print "program 9" }, ); $but2 = $frm_name1 -> Button(-text => "导出数据",-command =>\&sub_exp)-> pack(-side=>"left",-ipadx=>20,-padx=>30);
Perl's callback function parameter in tk is a reference to a function
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=324926971&siteId=291194637
Recommended
Ranking