Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by kcott (Archbishop)
on Jun 11, 2023 at 00:00 UTC ( [id://11152760]=note: print w/replies, xml ) Need Help??


in reply to How to Rename files in multiple directories with a Perl script using an array of hashes.

G'day ObiPanda,

Welcome to the Monastery.

"Glob is not my friend."

Without any examples of your "real subscription folder files", I can't give specific advice; however, here are some suggestions:

  • Build up $glob_expression separately and then just call glob($glob_expression). As an example, see my "Re: Set intersection problem" post from a couple of weeks ago, where I had to do something similar.
  • The glob() documentation has examples of dealing with filenames containing spaces (which can be considered as a special character). You may be able to do something similar with whatever special characters your filenames contain.
  • The File::Glob module may have useful information; in particular, GLOB_LIMIT seems relevant.
  • Show us some representative samples of your real data so that we can provide better answers. :-)

— Ken

  • Comment on Re: How to Rename files in multiple directories with a Perl script using an array of hashes.
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: How to Rename files in multiple directories with a Perl script using an array of hashes.
by ObiPanda (Acolyte) on Jun 11, 2023 at 18:15 UTC

    Thank you. The Perldocs File::Glob documentation helped me with a mistake I was making. I may have been confusing Perl with another language, but I had thought that single quotes don't work with variables. I am not a programmer.

    It looks as though my issue may not be glob anymore.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-12 10:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found