1 Oct 2008 03:15
Re: Testing for the existence of a header
Leonard Mills <lenm <at> ops.corpnet.sel.sony.com>
2008-10-01 01:15:07 GMT
2008-10-01 01:15:07 GMT
I use something like this:
open (F, "HEADERS") || die "Could not open input file: $:" ;
while ($line = <F> ) {
chomp ($line);
if ( $line =~ /X-SEL-encryption-scan/ ) {
# do something
}
}
Len
On Wed, 1 Oct 2008, Nigel Allen wrote:
>
>
> Thanks to David for the last advice - appreciated.
>
> Can anyone please tell me how to test for the existence of a header in
> an email?
>
> Some of the emails that flow through our server have a header - let's
> call it X-ABC whilst other do not.
>
> I need to test for the existence of X-ABC before I try to extract the
> value of it to a variable,
>
> Googled, searched etc etc - apologies - my perl is only exceeded by my
> good looks :(
>
(Continue reading)
RSS Feed