C:\_32\pscrpt>type test3.pl use strict; # https://perlmonks.org/?node_id=11133064 use warnings; my $template = 'd<'; my $nv = 2.4; $nv = 4135; # NOTE errors for this number my $p = pack $template, $nv; use Data::Dumper; $Data::Dumper::Terse = $Data::Dumper::Useqq = 1; my $s = Dumper $p; print ">$s<\n"; system $^X, '-wle', "use strict; print unpack('H*', $s);"; C:\_32\pscrpt>perl test3.pl >"\0\0\0\0\0'\260\@" < syntax error at -e line 1, at EOF Execution of -e aborted due to compilation errors. C:\_32\pscrpt>