Consider this snippet:
use strict;
use warnings;
my $data = "1";
my $packed = pack("I",$data);
open(my $file,">","test.bin") || die "error $!\n";
binmode $file;
print $file $packed;
The thing is, trying to read it from another language, this appears to be little endian. Is there any template argument that allows me to write it as big endian? I'd like to avoid doing extra work when reading.