#!/usr/bin/perl use Tk; use strict; use warnings; my $mw = MainWindow->new(-title => "Reach-Ticker by Dataabbel"); $mw->resizable(0,0); $mw->geometry("300x30+10+20"); my $label_w = $mw->Label(-textvariable => "")->pack(-expand => 1, -fill => 'x'); # leeres label erzeugen my $i = 0; my $text; ($text) = $mw->repeat(900, \&ping); MainLoop; sub ping{  my @data = qw (www.petra-hille.de www.google.de www.yahoo.de www.perl-community.de);  my $text;  my @pin = `ping -c 1 $data[$i]`;  if ($pin[4] =~ /received/) {    $text =  $data[$i] . " received ";    $label_w->configure(-textvariable => \$text);  }  $i = -1 if $i == $#data;  $i++;  return ($text); }