in reply to stream parsing an mbox file

You should have a look at the .. operator.
while (<FILE>){ if (/From/ .. /From/) { print $_; } }
The Problem will be, that your going into the if-part , even when someone mentioned the word "From" in his email :-)
----------------------------------- --the good, the bad and the physi-- -----------------------------------

Replies are listed 'Best First'.
Re: Re: stream parsing an mbox file
by johnfoobar (Initiate) on Apr 12, 2001 at 15:33 UTC
    so the if, in english, says: "print $_ if it's between these two things", right?

    the only problem i have with this is it's not adding the lines to a scalar, one for each message. the .. operator does look interesting though.

    i don't have a problem with quoting "From", it gets escaped with a ">" in most mbox files i've seen, so you have ">From" on such lines.