in reply to Re^2: pack() returns an unusable string
in thread pack() returns an unusable string
This seems to work :)
#!/usr/bin/perl -l 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::Dump qw(pp); my $s = pp $p; print ">$s<\n"; system $^X, '-wle', "use strict; print unpack('H*', $s);";
Outputs:
>"\0\0\0\0\0'\xB0\@"< 000000000027b040
|
|---|