$ cat pm_11133064_pack_test.pl
use warnings;
print "OS: $^O; Perl: $^V;\n",
`perl -V:usequadmath`, `perl -V:nvtype`, "\n";
my @templates = qw{d d< d> D D< D>};
for $template (@templates) {
print "TEMPLATE: $template\n";
$nv = 2.4;
$p = pack $template, $nv;
$s = "'$p'";
system $^X, '-wle', "print unpack('H*', $s);";
}
####
$ perl pm_11133064_pack_test.pl
OS: cygwin; Perl: v5.32.0;
usequadmath='undef';
nvtype='double';
TEMPLATE: d
3333333333330340
TEMPLATE: d<
3333333333330340
TEMPLATE: d>
4003333333333333
TEMPLATE: D
Invalid type 'D' in pack at pm_11133064_pack_test.pl line 11.
##
##
$ perl pm_11133064_pack_test.pl
OS: cygwin; Perl: v5.34.0;
usequadmath='undef';
nvtype='double';
TEMPLATE: d
3333333333330340
TEMPLATE: d<
3333333333330340
TEMPLATE: d>
4003333333333333
TEMPLATE: D
Can't find string terminator "'" anywhere before EOF at -e line 1.
TEMPLATE: D<
Can't find string terminator "'" anywhere before EOF at -e line 1.
TEMPLATE: D>
Can't find string terminator "'" anywhere before EOF at -e line 1.