Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Grouping files with the same name...

by siva kumar (Pilgrim)
on Nov 05, 2007 at 12:33 UTC ( [id://649004]=note: print w/replies, xml ) Need Help??


in reply to Grouping files with the same name...

If you are sure that you will be receiving one ".xml" file for all the customers then
1. Read list of unique customers.
@xmlFileNames=grep !/^\.\.?$/ && /\.xml$/,readdir(DIR); The number of xml you get is the number of total customers.

2. Loop through each customer and create zip.
foreach my $customer (@xmlFileNames) { $customer =~ s/\.xml//g; system ("/usr/local/bin/unzip ${customer}.zip ${customer}.xml ${ +customer}.pdf ${customer}.xls"); }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 20:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found