Matching Problem

2002-01-15 Thread Lysander
I setup sendmail to forward mail for a specifc addy to my PERL script. I can't figure out how to match the blank line between the header and the body of the message, though. I got ?^$? from an example in the perlop man page, but it doesn't seem to be working. Does anyone have a suggestion? Below

Re: Matching Problem

2002-01-15 Thread Lysander
- Original Message - From: "Jenda Krynicky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 15, 2002 4:28 PM Subject: Re: Matching Problem > From: "Lysander" <[EMAIL PROTECTED]> > To: <[EMAIL PROTEC

Re: Matching Problem (Solved)

2002-01-16 Thread Lysander
I didn't think I needed the \s+ because in the perlre man page it says $ matches the end of the line before the last newline. Anyway, that did work so I wanted to thank you. Sheridan - Original Message - From: "Tanton Gibbs" <[EMAIL PROTECTED]> To: "L

Sendmail and PERL

2002-01-17 Thread Lysander
Okay, this is probably more of a sendmail than a PERL question so I apologize. If anyone can give me information or even point me to a sendmail list or resource I would appreciate it. I am writing a PERL script that takes incoming mail, parses the contents, and then uses them to update a stat

Re: Sendmail and PERL (Solved)

2002-01-17 Thread Lysander
> :0 > * > /path/to/perlscript > > > > Roger > > > > At 08:15 AM 1/17/2002 -0800, you wrote: > >First thing I would do is check the permissions of the .forward file. It > >has to be VERY specific. I wish I remembered what it was.. > > > >Agus

Trying to use strict

2002-01-24 Thread Lysander
Okay, after reading various documents online I have decided to try and write my code using -w and strict. So here is the problem. How do I pass Arrays to subs? I assume declaring everything main:: would pretty much undermine the whole point of strict vars. So... for example I have this sub

Re: Trying to use strict

2002-01-24 Thread Lysander
- Original Message - From: "Shawn" <[EMAIL PROTECTED]> To: "Lysander" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 24, 2002 2:36 PM Subject: Re: Trying to use strict > > ----- Original Message - > From: "L

Re: Trying to use strict

2002-01-24 Thread Lysander
- Original Message - From: "Bob Showalter" <[EMAIL PROTECTED]> To: "'Lysander'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 24, 2002 2:48 PM Subject: RE: Trying to use strict > > -Original Message-

Date Manipulation

2002-01-25 Thread Lysander
I was wondering if there is an easy way to convert between date formats in PERL. Specifically I need to rewrite "22-January-2002" as "2002-01-22" prior to inserting into a date field in MySQL. In PHP (which is what I usually code in) I would just do something like $date = date("Y-m-d",strtotim

Using =~ with a list

2002-02-04 Thread Lysander
I need to replace all the occurances of one thing with another. This is simple enough, except that I am working with a list variable, rather than a scalar. @body =~ s/foo/bar/; give an error and for my $body (@body) { $body =~ s/foo/bar/; } appears to leave @body empty. How does

Re: Using =~ with a list

2002-02-07 Thread Lysander
r @body; print @body; and I get syntax error at ./test.pl line 10, near "s/foo/bar/ for " Execution of ./test.pl aborted due to compilation errors. Thoughts? Sheridan Saint-Michel - Original Message - From: "Randal L. Schwartz" <[EMAIL PROTECTED]> To: <[E