test9 360 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;
  11. my $tpl = Tpl->tpl_map("A(u)",\$i);
  12. for($i=0; $i<10; $i++) { $tpl->tpl_pack(1); }
  13. $tpl->tpl_dump($tmp1);
  14. my $j;
  15. my $tpl2 = Tpl->tpl_map("A(u)",\$j);
  16. $tpl2->tpl_load($tmp1);
  17. while($tpl2->tpl_unpack(1) > 0) { print "$j\n" }