in reply to How can I modify received socket messages in Perl?
First, I doubt your $buffer contains a message, except by luck. But if it does, why not just do
or equivalent$buffer = "\x{12}\x{34}\x{56}" . $buffer;
$buffer = (map chr, 0x12, 0x34, 0x56) . $buffer;
BTW, are messages in $buffer binary?
Assuming $buffer is being populated by sysread, $buffer is a string where each character represents a byte.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can I modify received socket messages in Perl?
by bonny95 (Initiate) on Mar 10, 2009 at 00:57 UTC | |
by ikegami (Patriarch) on Mar 10, 2009 at 02:52 UTC | |
by bonny95 (Initiate) on Mar 10, 2009 at 04:43 UTC | |
by ikegami (Patriarch) on Mar 10, 2009 at 05:18 UTC |