mirror of
https://github.com/troydhanson/tpl.git
synced 2024-12-26 23:57:25 +08:00
25 lines
341 B
Perl
Executable File
25 lines
341 B
Perl
Executable File
#!/usr/bin/perl
|
|
#
|
|
use strict;
|
|
use warnings;
|
|
|
|
use lib "..";
|
|
use Tpl;
|
|
|
|
my $pwd = `pwd`;
|
|
chomp $pwd;
|
|
|
|
my $tmp1 = "$pwd/$0_1.out";
|
|
|
|
my $i;
|
|
my $tpl = Tpl->tpl_map("B",\$i);
|
|
$i = pack("CCCC", 0xA, 0xB, 0xC, 0xD);
|
|
$tpl->tpl_pack(0);
|
|
$tpl->tpl_dump($tmp1);
|
|
|
|
|
|
$tpl = Tpl->tpl_map("B",\$i);
|
|
$tpl->tpl_load($tmp1);
|
|
$tpl->tpl_unpack(0);
|
|
print "$i\n";
|