Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: How to Rename files in multiple directories with a Perl script using an array of hashes.

by choroba (Cardinal)
on Jun 11, 2023 at 21:41 UTC ( [id://11152793]=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to Rename files in multiple directories with a Perl script using an array of hashes.
in thread How to Rename files in multiple directories with a Perl script using an array of hashes.

Using single quotes might solve some problems with spaces: but if the path contained a single quote, it would break again. As written in the documentation of glob, use bsd_glob from File::Glob if you don't want whitespace to be considered a separator.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
  • Comment on Re^3: How to Rename files in multiple directories with a Perl script using an array of hashes.
  • Select or Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2025-06-22 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.