where is the mistake?!

Discussion in 'Perl Misc' started by Geoff Cox, Oct 12, 2003.

  1. Geoff Cox

    Geoff Cox Guest

    Hello,

    I have a directory with 20 MS Word doc files in it and wish to create
    a separate zip file for each doc file. The names to be doc1.zip,
    doc2.zip, etc

    Is the code below anywhere near?!

    Cheers

    Geoff


    use warnings;
    use strict;

    use File::Find;
    use Archive::Zip;

    my $dir = 'd:/a-keep8/perl/test/business-location';

    find( sub {
    ( my $name = $_ ) or return;
    for (my $n=1;$n<21;$n++) {
    my $zip = Archive::Zip->new( $_ );
    $zip->writeToFileName(my $business-doc$n);
    }
    }, $dir );
    Geoff Cox, Oct 12, 2003
    #1
    1. Advertising

  2. Geoff Cox wrote:
    > I have a directory with 20 MS Word doc files in it and wish to
    > create a separate zip file for each doc file. The names to be
    > doc1.zip, doc2.zip, etc
    >
    > Is the code below anywhere near?!


    Err.. Ever thought of learning how to debug your Perl programs
    yourself rather than asking the readers of this group to do it for you?

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
    Gunnar Hjalmarsson, Oct 14, 2003
    #2
    1. Advertising

  3. Geoff Cox <> writes:
    > I have a directory with 20 MS Word doc files in it and wish to create
    > a separate zip file for each doc file. The names to be doc1.zip,
    > doc2.zip, etc
    >
    > Is the code below anywhere near?!


    What happened when you tried it? What did you expect to happen? What
    don't you understand about the difference?

    Contrary to what some people seem to think, we're happy to help out
    here, but we do require that you do a little bit of effort yourself.
    Posting code is a Good Thing(tm), but it's only the first step. Read
    the Posting Guidelines Tad McClellan posts to this group regularly,
    and you'll probably want to spend some time with ESR's "How to ask
    Questions the Smart Way" at
    <URL:http://www.catb.org/~esr/faqs/smart-questions.html>.

    -=Eric
    --
    Come to think of it, there are already a million monkeys on a million
    typewriters, and Usenet is NOTHING like Shakespeare.
    -- Blair Houghton.
    Eric Schwartz, Oct 14, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. \(beta-\) Frank Nitzsche

    where is the mistake?

    \(beta-\) Frank Nitzsche, Jun 25, 2004, in forum: VHDL
    Replies:
    4
    Views:
    539
  2. Jesse

    Beginner Mistake

    Jesse, Jul 22, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    364
    Jesse
    Jul 22, 2003
  3. Joerg Jooss
    Replies:
    1
    Views:
    405
    DotNetJunkies User
    May 22, 2004
  4. John
    Replies:
    6
    Views:
    654
  5. Leon

    Does anyone see my mistake?

    Leon, Nov 10, 2004, in forum: ASP .Net
    Replies:
    9
    Views:
    337
Loading...

Share This Page