Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello Dear monks , I need to know which is the best module for using Tk with perl. I need to be able to create a front end GUI a basic GUI using perl and TK . I went to CPAN and found lots of them and not sure which is which . Does anyone knows which one to use? thanks

Replies are listed 'Best First'.
Re: Perl/Tk
by kvale (Monsignor) on Feb 21, 2004 at 18:27 UTC
    The best module to start off with is Tk. Here is a hello world program to get you started, courtesy of the tuorial Tk Tutorial, Featuring Your Very Own "Perl Sig/OBFU Decoder Ring" on this site:
    #!/usr/local/bin/perl -w use strict; use Tk; my $mw = new MainWindow; $mw->Label(-text => 'Hello World!')->pack; $mw->Button(-text => 'Quit', -command => sub{exit} )->pack; MainLoop;

    -Mark

Re: Perl/Tk
by flyingmoose (Priest) on Feb 21, 2004 at 18:31 UTC
    use Tk;
    This will import nearly everything you would ever want.

    If you want more information, this is a wide subject, and can't be answered in pages upon pages of threads. You will have questions -- and more questions -- and more questions, and we'll be here all week trying to answer them all. I suggest getting a good book on the subject (Mastering Perl/Tk: ISBN ISBN 1565927168) or perhaps Googling for "Perl/Tk" and reading online documentation . As with anything, Perl/Tk is really easy once you know how :)

    Also, by searching the monastery, you'll find tons of Perl/Tk questions and answers already answered. Read up on them: SuperSearch

      To add to that... Once you have Tk on your machine there is a great widget demonstration program called widget that you can use. This demonstration can be usually called from the command line. It is a great working demonstration and lets you take a look at the Perl/Tk code for many widgets. As always, it is important to get the book and read, read, and read some more! Have fun learning!!!!! I know I have.
Re: Perl/Tk
by Anonymous Monk on Aug 28, 2010 at 23:42 UTC
    Check out Visual Camel on Sourceforge

    Visual Camel is a WYSIWYG Perl/Tk GUI builder that allows you to create a ready to run perl script. It is pretty easy to use also!