lance0r has asked for the wisdom of the Perl Monks concerning the following question:
Here is the result of running the program:#! /usr/bin/perl -w use strict; use threads; use MLDBM qw(DB_File Storable); use Fcntl; my $file = "/home/silly/g/data/100HOHsynTriNormCV.db"; my %syntrihash; tie %syntrihash,'MLDBM',$file, O_RDONLY or die "tie failed for db $!\n +"; my $checking = keys %syntrihash; print "$checking\n"; my $thr1 = threads->create({'context' => 'array'}, \&subthr1, "test1") +; my @return1 = $thr1 -> join(); print "@return1 \n"; sub subthr1{ my ($message) = @_; print "Thread Message is $message\n"; return (1,2,3); }
silly@bluetit:~/perl/threads$ thread.pl 100 Thread Message is test1 1 2 3 Segmentation fault
|
|---|