This gives the error -#!/usr/bin/perl use strict; use warnings; use MyStuff::Server; my $serverPort = '17077'; my %serverDictionary; $serverDictionary{"barry"} = new MyStuff::Server("barry","localhost",1 +7070); sleep(10); # and my package - # Represents a video server package MyStuff::Server; use strict; use warnings; use Thread; sub new { my $class = shift; my $self = { name => shift, }; bless $self, $class; my @paramters = ($self); my $thread = new Thread \&processJobs, \@paramters; return $self; } sub processJobs { my $self = shift; print "Processing Jobs for Server Named: ", $self->{name},"\n"; }
Line 43 is where I print. Thanks again!Pseudo-hashes are deprecated at line 43. Argument "barry" isn't numeric in hash element at line 43.
In reply to Re^2: Passing self to process as reference
by Anonymous Monk
in thread Passing self to process as reference
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |