#!/usr/bin/perl.exe
use warnings;
use encoding 'cp949', STDIN => 'cp949', STDOUT=>'cp949', STDERR=>'cp949';
use Encode;
open(FH, "<:encoding(cp949)", "$ARGV[0]") or die("file open error"); #첫번째
my $fn = decode("cp949", $ARGV[0]); #테스트
$fn =~ s/(\.txt)$/_ch$1/;
open(WT, ">:encoding(cp949)", "$fn" ) or die "Can't write file : $!"; #두번째
...
...
...