#!/usr/bin/perl -w use strict; use Tk; my $window= MainWindow->new; my $c1 = $window->Canvas(-background => 'saddlebrown', -width => '350', -height => '150')->pack; $c1->createText(175, 10, -fill => 'orange', -text => 'Print Queue Monitor'); $c1->createLine(0, 20, 351, 20, -fill => 'orange'); my $jobs01=`ls -all /directory/ | wc -l | awk \'{print \$1}\'`; chomp ($jobs01); $jobs01 +=88; $c1->createLine(88, 65, $jobs01, 65, -width => '10', -fill => 'green'); $c1->createText(45, 65, -fill => 'orange', -text => 'Spooler 1'); MainLoop;