my @threads = (); push @threads, threads->create(\&getData)->detach(); push @threads, threads->create(\&read1)->detach(); push @threads, threads->create(\&read2)->detach(); push @threads, threads->create(\&read3)->detach(); push @threads, threads->create(\&read4)->detach();