The Labs.Com X11 Lab PerlTK
Last update 12/8/2000
The Labs - Design & Functionality For The Net

Perl5 & Tk 4.0/8.0

Perl is surely the most powerful language for the UNIX platform to handle system-adminstration tasks. I nearly write everything in Perl nowadays, even graphic applications, not to mentioned 95% of all my CGIs (incl. heavy used CGIs, ie. web-counter, or webchat).

Overview:

  1. Download (incl. Perl, FreeBSD, Debian/Linux)
  2. Local Resources
  3. Official Resources
  4. Some Scripts
  5. Images within the Source

PerlTK
1. Download

PerlTK Download
Direct latest Tk8xxx.xx.tar.gz

Perl

 perl -MCPAN -eshell 
 cpan> install Tk 

FreeBSD

 cd /usr/ports/x11-toolkits/p5-Tk/ 
 make install 

Debian/Linux

 apt-get install perl-tk 

PerlTK
2. Local Resources

PerlTK Doc Local
Online Documentation (outdated)
PerlTK FAQ Local
FAQ (outdated)
Perl5
Our Perl page
TPJ: TK Examples
The Perl Journal sample PerlTK programs
Search:

PerlTK
3. Official Resources

comp.lang.perl.tk
The newsgroup
PerlTK Homepage
Interesting stuff
PerlTK Doc (original)
Online Documentation
PTK FAQ (original)
FAQ
The Perl Programming Language
Perl4/5 general infos
perlTk mailing-list archive
perlTk specific infos

PerlTK
4. Some Scripts

SystemViuw
Small script displaying cpu-load, and disk-spaces; for AfterStep
NetViuw
Small script displaying net-graphs (ppp0, eth0 etc); for AfterStep
WorkTimer
Timer to keep track of work
MyDiary
Diary program (text, audio & video)
MyDesk
Small and nice desktop program

PerlTK
5. Images within the Source

Usually images are externally handled:

 $pic = $top->Photo(-file => "earth.gif"); 
 $top->Button(-image => $pic)->pack; 

Use following phexdata:

 % phexdata < perl_camel.gif > data 

The data file read with your favourite editor into your perl source-code between "@d = (" and ");":

 @d = ( 
 "\x47\x49\x46\x38\x39\x61\x5a\x00\x5a\x00\xa2\x00\x00\xff\xff\xff... 
 "\x7d\x0f\x28\x6d\x6c\x4f\x81\x63\x06\x2f\x29\x74\x9a\x8a\x0b\x29... 
 .... 
 "\x0a\x02\x4a\x1c\x56\x6d\x66\x61\x5b\x49\x54\x4a\xd9\x10\xe0\x42... 
 ); 
  
 $img = $top->Photo(-data => join('',@d), -format => 'gif'); 

A sample source-code is inline-pic.pl.

                                                                                                                                   

X11 LabMyDesk

Last update 12/8/2000

All Rights Reserved - (C) 1997 - 1999, 2000, 2001 by The Labs.Com

Top of Page

The Labs.Com