sandeep has asked for the wisdom of the Perl Monks concerning the following question:

I have 20 zipped files text files named as pm.xxx (where xxx are the different city codes) under a particular directory. I want to write a perl program which will take the input files pm.xxx (one-by-one)from that directory, unzip the file, take the city code as reference variable, find the number of time a particular text is found,then again zip back the file and after that unzip the next file and so on. Please help me how to go about it.

Replies are listed 'Best First'.
Re: Processing of Zipped file
by jweed (Chaplain) on Feb 04, 2005 at 07:22 UTC
    Unfortunately, the copious free time I reserve for working without pay on the projects of others is currently occupied with an underwater basketweaving seminar.

    But seriously, folks are much more likely to take you seriously if you show us what you've tried to do so far. Here are some hints:
    perldoc -f readdir
    Compress::* & Co.
    perldoc -f m

    That should get you started. Make even a rudimentary attempt, and all the monks here will be much more helpful. HTH.



    Code is (almost) always untested.
    http://www.justicepoetic.net/
Re: Processing of Zipped file
by jbrugger (Parson) on Feb 04, 2005 at 07:21 UTC
    You could try to:
    Open the map containing your files,
    get the extention using a regexp
    search cpan for a zip-module like Archive::Zip

    He, do you expect us to write it for you, or are you willing to read a book, tutorials and Q&A's on this site?

    But anyway, i'd start by thinking about a good design etc., disign the tests needed, put it on paper, and start coding when finished.