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; #### 172 byteorder (byteorder.U): 173 This variable holds the byte order in a UV. In the following, 174 larger digits indicate more significance. The variable byteorder 175 is either 4321 on a big-endian machine, or 1234 on a little-endian, 176 or 87654321 on a Cray ... or 3412 with weird order !