Newsgroups: comp.lang.perl
From: jfri...@nff.ncl.omron.co.jp (Jeffrey Friedl)
Date: Tue, 15 Nov 1994 11:17:39 GMT
Local: Tues, Nov 15 1994 6:17 am
Subject: Re: Finding # of msgs in mailbox?
j...@plato.simons-rock.edu (James A. Robinson) writes:
|> I don't understand the mutiple line mode, and my attempt at "Multiple-line mode" just means that ^ and $ can match embedded newlines. Perhaps "multiple-line mode" is a misnomer. How about "magic ^/$ mode"? Searching for /^From / multi-line mode: default mode: So, if your whole spool is in a variable (such as $_), you can count ___ perl 4 ___ ____ perl 5 _____ { (the perl4 way will work with perl5, of course, but is not the "approved" way) It's important for your understanding to know what would happen if Think about it a bit. Answers discussed below. ----- If you don't already have the whole spool in a variable and don't need to |> $/ = ""; $* = 1; Just to comment here, had you used 'while' rather than 'if', *AND* used the (oh, and you would have missed the first "From " in the file if it was on Your mail system may well be different, but many (most?) UNIX mailers and you'll probably see that the mailer inserts '>' or whatnot in front -------------- It's important for your understanding to know what would happen if If you forgot to set multiline mode with If you used Go ye forth and practice unto perl. *jeffrey* You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||