http://www.perlmonks.org?node_id=938716

perl.j has asked for the wisdom of the Perl Monks concerning the following question:

I am making an "all-in-one calculator" (I guess). Here is my code (I know I do not have all subroutines defined, I'm still working on this as you can see):

use 5.12.4; use warnings; use Tk; ##### Create MainWindow ##### my $button_menu = new MainWindow; ############################# ##### MainWindow Buttons##### my $calculator_button = $button_menu->Button(-text=>"Calculator", -width=>10, -relief=> 'raised', -command=>\&open_calculator)->pack(); my $formulas_button = $button_menu->Button(-text=>"Formulas", -width=>10, -relief=> 'raised', -command=>\&open_formulas)->pack(); my $lcf_button = $button_menu->Button(-text=>"Find LCF", -width=>10, -relief=> 'raised', -command=>\&open_lcf)->pack(); my $gcf_button = $button_menu->Button(-text=>"Find GCF", -width=>10, -relief=> 'raised', -command=>\&open_gcf)->pack(); ############################# sub open_calculator{ system(qq{start "C:\\Windows\\system32\\calc.exe"}); } MainLoop;

Why does the system function not open the Windows calculator? Also, is there any source code I could use to make a basic calculator in Tk?

Thanks!

--perl.j