AUTOLOAD; require 5.008; use strict; use warnings 'all'; use diagnostics; use Win32::OLE qw[in]; use threads; use threads::shared; use strict; my @up: shared; my @childs; my $child; my @down: shared; my @list = qw ( c:/winnt d:/perl ); for (@list){ push @childs, threads->create("process_path","$_");} for $child (@childs){ $child->join();} for my $info (@up){ print $info;}#I'll do some work here once I get results sub process_path{ my $path = shift @_; my $Details={}; my $fso = Win32::OLE->new( 'Scripting.FileSystemObject' ); my $FSize = $fso->GetFolder($path); my $Size = $FSize->size(); $Details->{path}=$path; $Details->{size} =$Size; push @up, $Details; } #### C:\Scripts>threads1.pl Win32::OLE(0.1403) error 0x800a004c Win32::OLE(0.1403) error 0x800a004c in METHOD/PROPERTYGET "GetFolder" at C:\Scripts\threads1.pl line 33 thread failed to start: Can't call method "size" on an undefined value at C:\Scripts\threads1.pl line 34 (#1) (F) The entry point function of threads->create() failed for some reason. in METHOD/PROPERTYGET "GetFolder" at C:\Scripts\threads1.pl line 33 thread failed to start: Can't call method "size" on an undefined value at C:\Scripts\threads1.pl line 34 (#1) (F) The entry point function of threads->create() failed for some reason. Free to wrong pool 1a99e90 not 223f58 during global destruction.