Happy Friday to you all!

I have a very large file, almost half a Gig.  It's an MBX File that Outlook 
couldn't handle and is comprised of many email with large attachments.

Originally I had a program that opened it and would divide the Emails 
smallers files.  Since the file is soooo huge, My Perl Program just sits 
there and it doesn't produce any files.  I think it's trying to open up the 
entire file and THEN spit out tiny files.

My question is there a way to force it to read and immediately spit out a 
file or does Perl's file methods always read an entire file and then start
spitting out smaller files?

Thanks in advance,

I'm doing it 2 methods. 
1 - via a redirection on the Command line
while  (<>) 
{
        $_ = 'From <' . substr($_,0,-6) ;
        open (OUTFILE,">f:/$..eml");
        print OUTFILE $_;               
        close OUTFILE;
}
2 - Via a File handle.
        open(INPUTFILE,"< email.mbx") or die ("cannot open email.mbx");
        BINMODE INPUTFILE
        while (readline(*INPUTFILE)) {
                if (/\nFrom </) {
                        open (OUTFILE,">$..eml");
                        BINMODE OUTFILE;
                        print OUTFILE $_;               
                        $i++;
                        close OUTFILE;
                }
        }
close INPUTFILE

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to