in reply to changing codepage while saving to a text file
use strict; use diagnostics; use Encode 'from_to'; my @filenames = map { from_to( $_, 'cp1253' => 'utf8', ); $_; } glob '*'; { open my $filelisting, '>', 'filelisting' or die "could not open <f +ilelisting> for writing: $!"; binmode $filelisting, ':utf8'; print $filelisting join "\n", @filenames; close $filelisting; };
|
|---|