view conv.pl @ 427:09e0086a82a7 ref20150831 tip

Merge
author cin
date Tue, 15 May 2018 00:51:33 +0300
parents 47dac58691ee
children
line wrap: on
line source

#!/usr/bin/perl
use strict;
use File::Find;

find(sub {
    open my $hfile, "<:encoding(cp1251)", $_  or warn "failed: $!" and return;
    
    my @data = <$hfile>;
    
    close $hfile;
    undef($hfile);
    
    chomp foreach @data;
    
    open $hfile, ">:encoding(utf8)", $_ or warn "failed: $!" and return;
    
    print $hfile "$_\n" foreach @data;
    
}, qw(Lib _test _doc));