use Thread; my $blub = new Thread \&ssys ; sub ssys() { # den kompletten Pfad in einer Variable abspeichern my $location = "./Logfiles/Log_pack_$packetnumber[$pos].txt"; system ("kate $location"); }