15.03.2021, 12:09
Hi,
I am trying to convert a perl script to lua and ran into the pack command.
Simplified, this is what's in the script:
This results in :
How can I achieve this in lua?
The perl script also uses the unpack command...
Thanks for your help.
I am trying to convert a perl script to lua and ran into the pack command.
Simplified, this is what's in the script:
Code:
#!/usr/bin/perl -l
$data = "00990102";
$checksum = 49;
my $command = pack("H*","07F0" . $data . $checksum . "070F");
print $command;
This results in :
Code:
./test.pl |od -x --endian big
0000000 07f0 0099 0102 4907 0f0a
How can I achieve this in lua?
The perl script also uses the unpack command...
Thanks for your help.