for (1..10){ $num$_=$_; } #### $but1=$mw->Button(-text=>"something",-command=>\&something1)->pack;