On Thu, Jul 12, 2001 at 03:26:46PM -0400, darren chamberlain wrote:
*snip*
>
> Perl's printf is C's printf, and very fast. This is probably not
> a big deal to you, though. The real gain is that fact that you
> now can let Perl's printf Do The Right Thing, and not have to
> rely on a less than complete regex. I've been bitten before by
> regexes that appear to do the right thing, until given the wrong
> input... Those bugs are impossible to track down.
Thanks, I've made the change... although the whitespace problem
remains. This means processing the quotes upfront which I don't
have a problem with. And yes I do care about efficiency.
On the same theme... slurping in the entire fortune file might
irk me if I revive a much slower machine I've got which is
why I originally wanted to save the fortunes to a tied structure.
I haven't had time to delve into this.
>
> > Since we are on the subject and not having given much thought
> > ... (and yes this probably should be another post) ... I've
> > often come across neat quotes which I'd like to extract, should
> > I be using a filter to do this and if so has anyone come out
> > with anything robust enough to handle most the situations that
> > I'd be likely to see?
>
> Hmm... I have written a small mail processor before; they're
> pretty trivial, if you don't account for attachments. To extract
> a quote, assuming that the quote in question comes after the
> Net-standard "-- \n" signature indicator, I'd use a script like:
>
*snip*
> This will (should -- untested!) read the message in, extract the
> signature, and append it to a file. macro it in mutt, so mutt
> will pass the message to it in STDIN.
>
> OK, I shelled out and tested it with some trivial input, and it
> seems to work. If you do try it out, let me know.
Yup, it works.
Chris
--
Great spirits have always encountered violent opposition from mediocre
minds. -Albert Einstein