2 eval 'exec perl -wS $0 ${1+"$@"}'
5 open(OUTFILE, ">$ARGV[1]");
7 print OUTFILE "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
8 print OUTFILE "<org.openoffice.Templates>\n";
11 chdir($ARGV[0]) or die "can't chdir() to $ARGV[0]";
17 foreach $file (@files) {
18 if ( $file =~ /\w*\.tpl/ ) {
19 open(INFILE, "<$file") or die "can't open file $file";
21 if ( /xml version=/ ) {
30 print OUTFILE "</org.openoffice.Templates>\n";