Perl Monk, Perl Meditation PerlMonks

### Comment on

 Need Help??
Maybe the following helps a bit clarifying what's what:

```#!/usr/bin/perl

use strict;
use warnings;

use Data::Hexdumper qw(hexdump);
use integer;

my \$Rm = '0xAAAAAAAA';
my \$Rb = hex \$Rm;
my \$Rc = pack 'l', \$Rb;
my \$Rd = unpack 'l', \$Rc;
my \$Re = \$Rd >> 31;
my \$Rx = pack 'l', \$Re;

print 'Rm: ', hexdump( \$Rm, { suppress_warnings => 1 } );
print 'Rb: ', hexdump( \$Rb, { suppress_warnings => 1 } );
print 'Rc: ', hexdump( \$Rc, { suppress_warnings => 1 } );
print 'Rd: ', hexdump( \$Rd, { suppress_warnings => 1 } );
print 'Re: ', hexdump( \$Re, { suppress_warnings => 1 } );
print 'Rx: ', hexdump( \$Rx, { suppress_warnings => 1 } );

printf "Rb = 0x%x\t Re = 0x%x\n",\$Rb, \$Re;
which displays
```Rm:   0x0000 : 30 78 41 41 41 41 41 41 41 41 00 00 00 00 00 00 : 0xAAA
+AAAAA......
Rb:   0x0000 : 32 38 36 33 33 31 31 35 33 30 00 00 00 00 00 00 : 28633
+11530......
Rc:   0x0000 : AA AA AA AA 00 00 00 00 00 00 00 00 00 00 00 00 : .....
+...........
Rd:   0x0000 : 2D 31 34 33 31 36 35 35 37 36 36 00 00 00 00 00 : -1431
+655766.....
Re:   0x0000 : 2D 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : -1...
+...........
Rx:   0x0000 : FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 : .....
+...........
Rb = 0xaaaaaaaa  Re = 0xffffffffffffffff

Krambambuli
---

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

• Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
• Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
• Read Where should I post X? if you're not absolutely sure you're posting in the right place.
• Posts may use any of the Perl Monks Approved HTML tags:
a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
• You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
 For: Use: & & < < > > [ [ ] ]
• Link using PerlMonks shortcuts! What shortcuts can I use for linking?

Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2018-06-19 05:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Should cpanminus be part of the standard Perl release?

Results (111 votes). Check out past polls.

Notices?