[Techtalk] perl help
Conor Daly
c.daly at met.ie
Thu Oct 16 09:26:45 UTC 2008
On Wed, Oct 15, 2008 at 08:12:20AM -0700 or thereabouts, Maria McKinley wrote:
> Emma Rath wrote:
> >
> > I think that if your perl program is executing the entire following
> > line :
> >
> > if (!defined $FILE) { $FILE='^mail.log$' } # regex
> >
> > then the mail log file it will be trying to read further down will be :
> >
> > ^maillog$
> >
> > But you said that your mail log file is called :
> >
> > mail.log
> >
> > So I think that the line should read :
> >
> > if (!defined $FILE) { $FILE='mail.log' }
> >
> > I don't think that the regex (regular expression) characters of ^ and $
> > have any place there in the assignment line $FILE='mail.log'
> >
> > Emma
>
> Thanks Emma, that did the trick. Not sure why the ^ was ever in there...
> For anyone who is curious, I printed out my stats below.
>
> cheers,
> maria
I assume that's there to avoid picking up something like procmail.log (on
the prior assumption that $FILE will be used as a regexp within the script
rather than as an absolute filename).
Conor
--
Conor Daly,
Met Eireann, Glasnevin Hill,
Dublin 9, Ireland
Ph +3531 8064276 Fax +3531 8064247
*********************************************************************************
This e-mail and any files transmitted with it are confidential and intended solely for the addressee. If you have received this email in error please notify the sender.
This e-mail message has also been scanned for the presence of computer viruses.
Ta an riomhphost seo, agus aon chomhad ata nasctha leis, faoi run agus is don te a seoladh chuige amhain e. Ma tharla go bhfuair tu an riomhphost seo tri dhearmad cuir in iul don te a sheol e led' thoil.
Ta an teachtaireacht riomhphoist seo scuabtha le bogearrai frithvireas.
********************************************************************************
NorthBridge Mail Server id e9yrhg43fncvj3974vjenw
More information about the Techtalk
mailing list