in reply to renaming filenames

use utf8; # perlunitut: Unicode in Perl
use Win32::Unicode;

# unicode console out
printW "I \x{2665} Perl";

moveW $from, $to or die $!;
renameW $from, $to or die $!;

Replies are listed 'Best First'.
Re^2: renaming filenames
by andalou (Novice) on Aug 16, 2012 at 04:13 UTC

    I'm always getting the following error:

    Undefined subroutine &Errno::ERROR_FILE_EXISTS called at C:/Perl/site/ +lib/Win32/Unicode/Error.pm line 31.

      With what?

        with any code which has:

        use Win32::Unicode;

        inside it. So for example with your code:

        use utf8; use Win32::Unicode; # unicode console out printW "I \x{2665} Perl"; $from=poesía; $to=canción; # moveW $from, $to or die $!; renameW $from, $to or die $!;

        I get:

        I ♥ PerlUndefined subroutine &Errno::ERROR_FILE_EXISTS called at + C:/Perl/site/lib/Win32/Unicode/Error.pm line 31.