#!/usr/bin/perl use strict; use warnings; use SystemTray::Applet; my $num = 10; my $applet = SystemTray::Applet->new( "text" => $num, "callback" => sub { my ($self) = @_; $self->{"text"} = $num; } );