Well I'm just learning perl and here's a snippet from a program that will eventually convert eudora mailboxes into html pages. This is my first attempt at a perl program and I've learned a lot by wrestling with it, but I'm baffled by an error that keeps coming up. this was a test to read from a file and incrementaly load an array when ever I come across a from field. This works fine but when I add the $file++; then I get: Use of uninitialized value, <MAIL> chunk 113. thanks, karl #!perl -w $inPath = "test y"; $outPath = "test x"; $file=0; #init my file count open (MAIL, $inPath) || die "can't open: $!"; open (MAILOUT, ">$outPath$file.html") || die "can't open: $!"; @a = <MAIL>; foreach (@a) { chomp; if (/From:/) { $file++; #if I take this out it runs fine #if I leave it I get # Use of uninitialized value, <MAIL> chunk 113. $auther[$file] = $_; print STDOUT "this is $auther[$file] and the file is $outPath$file\n and this is the @auther\n\n"; } } close (MAIL) || die "can't close MAIL: $!"; close (MAILOUT) || die "can't close MAILOUT: $!"; -==Karl Long==- -== mailto:klong@viant.com?subject=the%20money%20IOU ==- -== http://www.viant.com ==- -= aol im: mrukfunky =- -=42 is the answer, the only problem is figuring out the question=- # ===== Want to unsubscribe from this list? # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org