and removed by the Writer and send if $ID ne $1:push @chat, "$self->{ID}\t$1";
So the Writer skips the lines with its ID, ok? But this is easy to change!!$chat[$i] =~ /(.+?)\s(.+)[\n\r]*/; print $socket $2,$EOL if ( $1 ne $ID && $2 ne $kill);
The occurence of the warning of the line 120:
is something that I don't understand!!%E = (map { $1 => $2; /(.+):(.+)/; } (split /;/, $Elm));
or/(.+):(.+)/;
or if you have a seperate function for those two:$1 => $2;
so that the line 120 looks likesub _split { /(.+):(.+)/; return ($1 => $2) if ($1); }
%E = (map { _split($_) } (split /;/, $Elm));
Finally I have to tell you that there is a really, really stupid bug, after the loop of the Writer. This code
has to be changed into:$Elm =''; # to rewrite $E foreach ( split /;/, $Elm ) { $Elm .= "$_;" unless ( $_ =~ /^$ID\:/); } cond_broadcast($Elm);
I think, now everything is ok,my $tmp = ''; foreach ( split /;/, $Elm ) { $tmp .= "$_;" if ( $_ !~ /^$ID\:/ && $_ =~/:/); } $Elm = $tmp; cond_broadcast($Elm);
In reply to Re: Re: thread:shared
by Anonymous Monk
in thread thread:shared
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |