annotate conv.pl @ 404:9ef75f2029be default

sync
author cin
date Fri, 28 Aug 2015 19:54:53 +0300
parents 47dac58691ee
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
181
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
1 #!/usr/bin/perl
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
2 use strict;
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
3 use File::Find;
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
4
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
5 find(sub {
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
6 open my $hfile, "<:encoding(cp1251)", $_ or warn "failed: $!" and return;
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
7
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
8 my @data = <$hfile>;
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
9
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
10 close $hfile;
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
11 undef($hfile);
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
12
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
13 chomp foreach @data;
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
14
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
15 open $hfile, ">:encoding(utf8)", $_ or warn "failed: $!" and return;
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
16
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
17 print $hfile "$_\n" foreach @data;
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
18
47dac58691ee New templating system, small fixes
sourcer
parents:
diff changeset
19 }, qw(Lib _test _doc));