programming-examples/perl/SystemFunction/Combine unpack and pack in one statement.pl
2019-11-15 12:59:38 +01:00

3 lines
76 B
Perl

$decimal = 4;
$binary = unpack("B32", pack("N", $decimal));
print $binary;