#!/usr/bin/perl use strict; use warnings; use threads ('stack_size' => 16384); use Thread::Suspend; $|=1; sub start_thread { my @args = @_; print('Thread started ', join(' ', @args,), "\n"); } my $thr = threads->create(\&start_thread); $thr->join(); my $tid = threads->self; $thr->suspend($tid); sleep 1; $thr->resume($tid);