Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-03-29 08:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found