I tried running it on ActiveState build 618, and got the same results as you-nothing. So I decided to try it from the command line with -w for warnings, and got:
C:\WINDOWS\Desktop> perl -w tk1.pl
Useless use of a constant in void context at tk1.pl line 5.
Use of uninitialized value in concatenation (.) at C:/Perl/site/lib/Tk.pm line 350.
Use of uninitialized value in concatenation (.) at C:/Perl/site/lib/Tk.pm line 350.
Line 5 was the line you have as "Mainloop;" -when I changed this to "MainLoop();", it worked for me. Trying "-w" gave only:
C:\WINDOWS\Desktop> perl -w tk1.pl
Use of uninitialized value in concatenation (.) at C:/Perl/site/lib/Tk.pm line 350.
Use of uninitialized value in concatenation (.) at C:/Perl/site/lib/Tk.pm line 350.
I did get the button you intended, then.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.