What You Should Already Know

To get the most out of this book, you should already know the basics of programming in Perl, Version 5. You don’t have to be a Perl guru to learn Perl/Tk, but it will help if you feel comfortable with the language.[1]

Perl/Tk utilizes the object-oriented features available in Perl 5, so even if you don’t completely understand OO programming, you should be able to recognize it when you see it. The only other thing you’ll need is prior knowledge of other graphical user interfaces (GUIs) and your opinions on them. This helps when deciding what features to include in your own applications. Take a look at the word processor you use on your PC, your web browser, or any program that has buttons and scrollbars and accepts both mouse and keyboard input.

In this book, we’ll be covering each basic widget and all its associated options in detail. You’ll learn how to make a window look the way you want it to look. You’ll also learn how to make a window user-friendly and attractive. Other important topics include image creation and manipulation, interprocess communications, and mega-widget details. We also take a look inside the Tk event loop, encompassing events, bindings, and callbacks.

To complement the examples and code snippets, you will find complete programs scattered throughout the book and in Appendix C. These range from RPN calculators and LWP web clients to Robot Control programs written in Perl and Tcl.

If you want to know more about Perl in general, you should read Learning Perl, Programming Perl, Advanced Perl Programming, and The Perl Cookbook, which are all also published by O’Reilly & Associates, Inc. From other publishers, you might also try Object Oriented Perl (Manning), Elements of Programming in Perl (Manning), and Effective Perl Programming (Addison Wesley). There are also numerous FAQs and documents available on the Web.



[1] Here’s the laundry list of things you should at least recognize: hashes, arrays, subroutines, and their anonymous versions, as well as $ _ and @ _.

Get Mastering Perl/Tk now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.