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

Re: Is the documentation for Perl 5.20 'pack' correct?

by Anonymous Monk
on Jul 07, 2015 at 00:53 UTC ( [id://1133481]=note: print w/replies, xml ) Need Help??


in reply to Is the documentation for Perl 5.20 'pack' correct?

http://perl5.git.perl.org/perl.git?a=search&h=HEAD&st=grep&s=byteorder

http://perl5.git.perl.org/perl.git/blob?f=configpm#l317

Config_heavy.pl

my $i = ord(4); foreach my $c (3,2,1) { $i <<= 8; $i |= ord($c); } our $byteorder = join('', unpack('aaaa', pack('L!', $i))); s/(byteorder=)(['"]).*?\2/$1$2$Config::byteorder$2/m;

byteorder / http://perl5.git.perl.org/perl.git/blob?f=Porting/Glossary#l172

172 byteorder (byteorder.U): 173 This variable holds the byte order in a UV. In the followi +ng, 174 larger digits indicate more significance. The variable by +teorder 175 is either 4321 on a big-endian machine, or 1234 on a littl +e-endian, 176 or 87654321 on a Cray ... or 3412 with weird order !

Detecting machine Endian-ness

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found