Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Sending raw hex in UDP packets

by graff (Chancellor)
on May 08, 2013 at 00:01 UTC ( #1032548=note: print w/replies, xml ) Need Help??

in reply to Sending raw hex in UDP packets

Even though the pack function can be a bit hard to grok from the documentation, it seems like a more "intuitive" approach in this sort of case (or, at least it would, if anything about "pack" were intuitive...)
perl -e 'for $i (1..3) { print pack( "C*", 0x21, $i, 0x55 ) }' | xxd - +g 1 0000000: 21 01 55 21 02 55 21 03 55 !.U!.U!.U
(UPDATE: In case it helps, remember that there's also the ample "tutorial" man page for pack: perlpacktut)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1032548]
[Discipulus]: fore every 2 good old monks that come back, we will accept 1 clinical
[planetscape]: Might be "well, come back!" Discipulus ;-)
[stonecolddevin]: that's a 2.0 k/d ratio, i'll take it
[choroba]: #cbstream still down?
[erix]: yeah, annoying
[choroba]: last ambrus: 1 week ago :-(
[erix]: let's invade Hungary
[planetscape]: darn
[erix]: probably on holiday, the slacker

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2017-06-22 21:05 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (530 votes). Check out past polls.