www.pudn.com > sdk_host_2520.rar > resappend.pl


# resappend.  This file is used to append the resource lists together. 
# a previous version of standard.mk used the copy command which seems to have 
# a character buffer limit. 
#!/user/bin/perl 
 
$num = @ARGV; 
 
if ($num < 2) 
{ 
   print "Error - not enough parameters passed in\n"; 
} 
 
# pop off the last parameter, it is the output filename. 
my $OutputFile = pop @ARGV; 
 
open(OUT,">$OutputFile") || die(">>>>>Error - cannot create file<<<<<"); 
print "Appending resource files - resappend.pl\n"; 
print "Number of parameters = $num\n"; 
 
foreach my $filename(@ARGV) 
{ 
   print "\t$filename\n"; 
 
   open(IN,"<$filename") || die(">>>>>Error - cannot open file<<<<"); 
 
   while ($inLine = ) 
   { 
      print OUT $inLine; 
#      print $inLine;      #for text dump debugging 
   } 
   print OUT "\n";   # new line 
#  print "\n";   # new line for text dump debugging 
   close(IN); 
    
}