Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Comparing packed variables

by Tux (Canon)
on Mar 18, 2021 at 08:30 UTC ( [id://11129900]=note: print w/replies, xml ) Need Help??


in reply to Comparing packed variables

GrandFather is spot-on!

To steal a sheet from a talk I did many years ago:

use Data::Peek; foreach my $b (qw{ i I s S l L j J n N v V q Q }) { foreach my $e ("", "!", "<", ">") { $e =~ m{[<>]} && $b =~ m/[cCnNvV]/ and next; $e =~ m{[!]} && $b =~ m/[jJqQ]/ and next; my $f = "$b$e"; print STDERR "$f\t"; DHexDump pack $f => 0x1234567; } }

==>

i686 Core(TM) i7-2620M x86_64 Xeon(R) E5320 ia64 Itanium + 2 === ======================== ======================== ============== +========== i 67 45 23 01 67 45 23 01 01 23 45 67 i! 67 45 23 01 67 45 23 01 01 23 45 67 i< 67 45 23 01 67 45 23 01 67 45 23 01 i> 01 23 45 67 01 23 45 67 01 23 45 67 I 67 45 23 01 67 45 23 01 01 23 45 67 I! 67 45 23 01 67 45 23 01 01 23 45 67 I< 67 45 23 01 67 45 23 01 67 45 23 01 I> 01 23 45 67 01 23 45 67 01 23 45 67 s 67 45 67 45 45 67 s! 67 45 67 45 45 67 s< 67 45 67 45 67 45 s> 45 67 45 67 45 67 S 67 45 67 45 45 67 S! 67 45 67 45 45 67 S< 67 45 67 45 67 45 S> 45 67 45 67 45 67 l 67 45 23 01 67 45 23 01 01 23 45 67 l! 67 45 23 01 67 45 23 01 00 00 00 00 00 00 00 00 01 + 23 45 67 l< 67 45 23 01 67 45 23 01 67 45 23 01 l> 01 23 45 67 01 23 45 67 01 23 45 67 L 67 45 23 01 67 45 23 01 01 23 45 67 L! 67 45 23 01 67 45 23 01 00 00 00 00 00 00 00 00 01 + 23 45 67 L< 67 45 23 01 67 45 23 01 67 45 23 01 L> 01 23 45 67 01 23 45 67 01 23 45 67 j 67 45 23 01 00 00 00 00 67 45 23 01 00 00 00 00 00 00 00 00 01 + 23 45 67 j< 67 45 23 01 00 00 00 00 67 45 23 01 00 00 00 00 67 45 23 01 00 + 00 00 00 j> 00 00 00 00 01 23 45 67 00 00 00 00 01 23 45 67 00 00 00 00 01 + 23 45 67 J 67 45 23 01 00 00 00 00 67 45 23 01 00 00 00 00 00 00 00 00 01 + 23 45 67 J< 67 45 23 01 00 00 00 00 67 45 23 01 00 00 00 00 67 45 23 01 00 + 00 00 00 J> 00 00 00 00 01 23 45 67 00 00 00 00 01 23 45 67 00 00 00 00 01 + 23 45 67 n 45 67 45 67 45 67 n! 45 67 45 67 45 67 N 01 23 45 67 01 23 45 67 01 23 45 67 N! 01 23 45 67 01 23 45 67 01 23 45 67 v 67 45 67 45 67 45 v! 67 45 67 45 67 45 V 67 45 23 01 67 45 23 01 67 45 23 01 V! 67 45 23 01 67 45 23 01 67 45 23 01 q 67 45 23 01 00 00 00 00 67 45 23 01 00 00 00 00 00 00 00 00 01 + 23 45 67 q< 67 45 23 01 00 00 00 00 67 45 23 01 00 00 00 00 67 45 23 01 00 + 00 00 00 q> 00 00 00 00 01 23 45 67 00 00 00 00 01 23 45 67 00 00 00 00 01 + 23 45 67 Q 67 45 23 01 00 00 00 00 67 45 23 01 00 00 00 00 00 00 00 00 01 + 23 45 67 Q< 67 45 23 01 00 00 00 00 67 45 23 01 00 00 00 00 67 45 23 01 00 + 00 00 00 Q> 00 00 00 00 01 23 45 67 00 00 00 00 01 23 45 67 00 00 00 00 01 + 23 45 67

Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11129900]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found