Richard, thanks for the reply. I've not been on the list for a while, so good to see you're still helping us less-knowledgeable people out :)

If you already *KNOW* Perl and want to use it, its string manipulation
package is probably better from a sheer performance stand-point.



No, I don't know Perl, but one of our guys does. Its like a war - php is better, perl is better, etc. :)

But I scrape and parse all the time, and just use set_time_limit(0) on
shell scripts that I expect to run a long time, and use a different
php.ini for them if I need a ton of RAM.


thats worth knowing. this is not running from the command line, so wonder if this could be a cause

I would still code them to not read in all 15M attachments at once,
personally.


ok - could you give me a little insight into how you might do it? I've explained what we're doing below

Actually, if I was messing with emails, I'd suggest using IMAP to read the
emails, and then you can get only the parts of the email you need, and
pretty much ignore the attachments -- assuming you don't need to parse the
attachment itself...


ok, well its actually the attachment we're after. basically we have a client that sends an automated update email via some software and we're piggy-backing on it to grab the data out. The email contains a password protected zip file. We're pulling the email down (from another server) extracting the attachment out and then parsing in the xml file contained within the zip and moving the images (also within the zip) to a different location.

I'd not suggest that you run off and start learning Perl, though, just to
handle these tasks. It would take you years to become proficient enough
in Perl to have a better application by reaping the benefits of Perl's
better performance.


ok - appreciate the comment here

And your PHP code is almost for sure always going to be more maintainable
than the Perl version.  Perl code almost always ends up being so...
squeegley, if you know what I mean.



Yeah, I'd agree on this! I've tried with perl code before and failed to understand even a simple script :)

thanks for the help again

John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to