#!/usr/bin/perl use threads; use strict; my $thr = threads->new(\&sub1); sub sub1 { print "hi from thread"; }