[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-date: Tue May 18 17:51:44 2004 -->
- <!--x-from-r13: psbjyre ng bhgcbfgfragvary.pbz (Quevfgbcure Tbjyre) -->
- <!--x-message-id: [email protected] -->
- <!--x-subject: [ale] Perl binary -> hex -->
- <li><em>date</em>: Tue May 18 17:51:44 2004</li>
- <li><em>from</em>: cfowler at outpostsentinel.com (Christopher Fowler)</li>
- <li><em>subject</em>: [ale] Perl binary -> hex</li>
Here is some code that I have:
while (1) {
my $data =undef ;
($hispaddr = recv(SOCKET, $data, 1024, 0)) || die "recv:
$!";
($port, $hisiaddr) = sockaddr_in($hispaddr);
do {
use bytes;
print length($data)."\n";
}
}
I've tried using a for loop to walk the $data byte by byte but that does
not seem to work.
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00724" href="msg00724.html">[ale] Perl binary -> hex</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00720.html">[ale] aio calls</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00722.html">[ale] Re: Msg reply</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00968.html">[ale] Re: Yahoo!</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00724.html">[ale] Perl binary -> hex</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00721"><strong>Date</strong></a></li>
<li><a href="threads.html#00721"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>