#!/usr/bin/perl -w use strict; use threads; my $t = new threads \&sub_to_run; $t->detach(); if ($name eq "rudi"){ #BEENDE DEN THREAD $t !!! kill($t->tid); ??? } ...