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

Re: dos file masks and regular expressions

by reasonablekeith (Deacon)
on Jan 04, 2006 at 11:24 UTC ( [id://520847]=note: print w/replies, xml ) Need Help??


in reply to dos file masks and regular expressions

Presuming (in your example) "do stuff..." is going to go off and try to find the files, you can probably get away with using 'glob', which will do both steps in one and return a list of files matching the passed expression...
my @sources = glob("c:\\temp\\*"); print join("\n", @sources) . "\n"; __OUTPUT__ c:\temp\afile.txt c:\temp\anotherfile.txt etc...
---
my name's not Keith, and I'm not reasonable.

Replies are listed 'Best First'.
Re^2: dos file masks and regular expressions
by fluffyvoidwarrior (Monk) on Jan 04, 2006 at 12:00 UTC
    Actually its a bit more complicated than that and perhaps I should have given more information. What I'm actually doing is trying to pass the generated regexp to archive::zip to create an archive according to a dos filemask which archive::zip doesn't seem to do. If I globbed the dir I'd then have to handle writing loads of individual members to my archive ....

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-23 16:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found