Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Some questions.

1. Active Perl or Strawberry Perl ?

2. What shows your $_ in your program ? With my XP, it shows 8.3 style file names(For example, "Program Files"=> Progra~1).

foreach (@files) { print "$_\n"; my $original = $_; s/canción/poesía/; rename "$directory\\$original", "$directory\\$_"; }
What would $_ with Windows 7?.

3. When you install Win32::Unicode,Win32::Unicode::Dir, Does this work ?

use strict; use warnings; use utf8; use Win32::Unicode; use Win32::Unicode::Dir; my $wdir = Win32::Unicode::Dir->new; $wdir->open('./'); while ( my $file=$wdir->fetch ) { next if( $file !~ /^canción/ ); my $file_new=$file; $file_new =~ s/canción/poesía/; printW "$file ==> $file_new\n"; #moveW($file, $file_new) or die $!; } $wdir->close;
I tried with ActivePerl. As "andalou" says, I also met the same error when calling moveW. It seems lacking XS's function which is calling Win32API. I guess Strawberry Perl works ... fine?

Update:
I understand OP="andalou" now. If you are using Active Perl,

ppm install "http://sourceforge.jp/frs/g_redir.php?m=jaist&f=%2Fassp%2 +FASSP+V2+multithreading%2Fpackages%2FWin32-Unicode.ppd"
will remove your Win32::Unicode error messages. </code>


In reply to Re^4: renaming filenames by remiah
in thread renaming filenames by andalou

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others examining the Monastery: (2)
    As of 2014-07-26 20:13 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (179 votes), past polls