[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



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 -&gt; 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 -&gt; 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>