O'Reilly logo

Learning Perl/Tk by Nancy Walsh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. Introduction to Perl/Tk

There are many different modules available that extend the functionality of Perl. This book will concentrate on the Tk module. The Tk module allows us to easily add a graphical interface to our Perl scripts and still use all the features that make Perl great. Instead of requiring a typed command with some options or user input on the command line, your program is invoked with an icon or a simple command and the interface handles everything from there.

The Tk extension to Perl doesn't come with the standard distribution of Perl.[1] You'll need to get it separately from a CPAN site and install it. After you install the Tk module, you simply add use Tk; to the top of your Perl scripts.

[1] Unless you get the Win32 binary from CPAN, or another pre-built distribution such as ActiveState Perl.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required