our @aryItems : shared; # Update: line added after initial posting # Here is the Foo class package Foo; use threads; # pull in threading routines use threads::shared; # and variable sharing routines # create a new Foo object sub new { my $pkg = shift; my $self = { @_, ... }; return bless($self, $pkg); } sub run { my $self = Foo->new(@_); my $id = $self->{id}; ... print "Hello from thread $id.\n"; print "Item $aryItems[$id]\n"; splice(@aryItems, $id); return 1; }