in reply to perl dying without a trace

I can't reproduce this with just the code you provide:
#!perl $rc = syswrite $socket, pack("N",$self->{'length'}+length($SP_MAGIC)), + 4; print "Ok";
prints: "Ok"

I'm not disregarding the possibility of some bug in perl, but it's likely that the bug originates somewhere else. First up, what's in $self->{length}, $socket and $SP_MAGIC?

Replies are listed 'Best First'.
Re^2: perl dying without a trace
by Crackers2 (Parson) on Oct 24, 2006 at 22:58 UTC

    Yes I know that won't cause it :)

    $self->{length} is 417, $socket is bless( \*Symbol::GEN0, 'IO::Socket::INET' ); according to Data::Dumper, and $SP_MAGIC is a 4-char alfanumeric string.

        No it doesn't, since if I replace the line with that I get protocol errors all over the place and never run long enough to run into the error :)

        See my response to diotalevi for what turned out the be the problem, the newbie-ish mistake of not handling SIGPIPE properly.