Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

File::Find and replacing spaces in filenames.

by Kyshtynbai (Sexton)
on Dec 22, 2012 at 16:56 UTC ( [id://1010031]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
        $_ =~ s/ /_/g; # replacing spaces with _
        rename "$File::Find::dir/$file", "$File::Find::dir/$_"; # renaming
    + files
    }
    
  2. or download this
    Can't cd to (/home/ivan/M1/) Some Dirname With Spaces: no such file or
    + directory
     at ./1.pl line 16
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1010031]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-26 05:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found