in reply to Re^4: pack() returns an unusable string
in thread pack() returns an unusable string
Just another guess (to tweak GrandFather) because I don't have a Windows system to test on.
#!/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) =~ s/"(.*)"/qq($1)/sr; # tweak for different delimiter print ">$s<\n"; system $^X, '-wle', "use strict; print unpack('H*', $s);";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: pack() returns an unusable string
by syphilis (Archbishop) on May 27, 2021 at 06:06 UTC | |
by tybalt89 (Monsignor) on May 27, 2021 at 13:26 UTC |