You've got two relatively complex things going on here:
- Creating a Zip file (Win32::P::C... and such)
- Sending a mail message
I guess the basic question is, which one is failing? Done any diagnostics to get that far?
Secondly, you're firing off another process to create this zip file and then immediately trying to send the file created. You've got two concurrent (DETACHED) processes fighting for access to this file. I'll bet you've got some sort of perverse deadlock in there.
I think instead of W::P::C to fire off a process to create the file, just use system() or qx{}. That way you: create the file, mail it, create the next file, mail it -- no contention.
I'll leave the style nits to someone else.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.