#!/usr/local/bin/perl use strict; exit 1 unless (my $mail_from = <>); exit 1 unless open (AD,'/home/ajdelore/.addressbook'); while () { my $addr = (split /\t/)[2]; $addr =~ s/\s+//g; exit 0 if $mail_from =~ /$addr/i; } exit 1;