Log in



Archive for August 30th, 2010

Write perl script to pull out attachments from email and save to a directory?

August 30th, 2010 by

Question by CWB rider: Write perl script to pull out attachments from email and save to a directory?
Does anyone know the portion of code that would pull out an attachment from an email and save in a given directory via PERL?
Any help will do, Thanks

Best answer:

Answer by mti2935
Check out MIME-tools at http://www.zeegee.com/products/MIME-tools/.

We’ve been using this open-source product for years, and it works very well. It can decode emails from just about any mail client out there.

Give your answer to this question below!

How do i get the number of bytes uploaded using perl?

August 30th, 2010 by

Question by Edison L: How do i get the number of bytes uploaded using perl?
I wanna get the amount of bytes of a file uploaded and the total file size of the file using perl. I just started learning perl so i don’t know much please help

Best answer:

Answer by martinthurn
For the first part, depends on what exactly you mean by “uploaded”. SHOW US YOUR CODE for god’s sake!
For the second part, the -s switch tells you the size of a file.

my $iSize = -s ‘filename.txt’;
print “size is $iSize bytes\n”;

Give your answer to this question below!


Powered by Yahoo! Answers