$sep_char = ' ';
}
+if (not @{$options{remove_name}}) {
+ $options{remove_name} = ['.+\/',
+ ];
+}
+
my %wb_formats = ();
my $csv = Text::CSV->new({sep_char=>$sep_char});
my $wb = Spreadsheet::WriteExcel->new(\*STDOUT);
$file = "STDIN";
}
else {
- $fh = IO::File->new($file,'r') or
+ open($fh,'<:encoding(utf8)',$file) or
die "Unable to open $file for reading: $!";
}
my $ws_name = $file;
foreach my $remove (@{$options{remove_name}}) {
- $ws_name =~ s{\Q$remove\E}{}g;
+ $ws_name =~ s{$remove}{}g;
}
$ws_name =~ s{\.[^\.]+$}{}g;
$ws_name =~ s/_+/ /g;