REVIEW - Learning Perl/Tk


Learning Perl/Tk


Nancy Walsh



O'Reilly (1999)




Rick Stones


December 1999



If you want to write a script (for UNIX/Linux or Win32) with a GUI interface, I think Perl/Tk should be high on your list of choices

One of the limitations of Unix has always been graphics. It's not that you can't do graphics, it's just that writing an X- Windows program in C or C++ was a big undertaking, when all you wanted was a fancy version of your small command line based shell or Perl script. There has been Tcl/Tk for a long time, but for many of us than meant learning a new scripting language and frankly, I never got round to it. Now suddenly the choice has exploded, with GNOME/GTK+, KDE/Qt and at last, a GUI capability for Perl. Even better from the point of view of people who already know Tcl/Tk, it's Tk for Perl. At last us Perl fans can go GUI.

This book assumes a reasonable, but by no means expert level of Perl knowledge and no Tk knowledge at all. The book starts from the ubiquitous 'Hello World', but this time in a window and moves on though all the different widgets you can use. Along the way layout, callbacks, events and other items are well covered. I did find the book a little bit of a reference tour through the material, there are plenty of good code snippets, but not much in the way of more substantial examples. It is all well explained, in as much depth as I can think most people will need.

If you don't have a version of Perl that supports Tk, (try the command perl -e 'use Tk') worry not, I fetched and installed the Tk module from CPAN for my Linux system with no problems. It's also available for win32 from Active State. Just follow the links from

I did find a couple of minor typos in the book I had, a quick look on the O'Reilly web site showed these as known errata, already fixed in a later printing. If you want to write a script (for UNIX/Linux or Win32) with a GUI interface, I think Perl/Tk should be high on your list of choices and this is a good book to teach you how to do it. If you don't already know Perl, then you will also need to work through a Perl book first. Personally I would recommend 'Learning Perl' which is also published by O'Reilly. Recommended.

Book cover image courtesy of Open Library.

Your Privacy

By clicking "Accept All Cookies" you agree ACCU can store cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

By clicking "Share IP Address" you agree ACCU can forward your IP address to third-party sites to enhance the information presented on the site, and that these sites may store cookies on your device.