test18 337 B

1234567891011121314151617181920212223
  1. #!/usr/bin/perl
  2. #
  3. use strict;
  4. use warnings;
  5. use lib "..";
  6. use Tpl;
  7. my $pwd = `pwd`;
  8. chomp $pwd;
  9. my $tmp1 = "$pwd/$0_1.out";
  10. my @i=(1,2,3,4);
  11. my $tpl = Tpl->tpl_map("i#",\@i, 3);
  12. $tpl->tpl_pack(0);
  13. $tpl->tpl_dump($tmp1);
  14. my @j;
  15. my $tpl2 = Tpl->tpl_map("i#",\@j,3);
  16. $tpl2->tpl_load($tmp1);
  17. $tpl2->tpl_unpack(0);
  18. print "$_\n" for @j;