in reply to Re: How to use pack/unpack data over a network
in thread How to use pack/unpack data over a network
I started out thinking this would be a lot cleaner, but as you can see it doesn't look any better. *shrug*my $str_len = length($data); $str_len += (4 - $str_len % 4 || 4); print $sock pack("NZ$str_len", length($data), $data);
|
|---|