Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jun 2004 11:38:02 -0400
From:      "JJB" <Barbish3@adelphia.net>
To:        "freebsd-questions@FreeBSD. ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   perl script code
Message-ID:  <MIEPLLIBMLEEABPDBIEGMECHGDAA.Barbish3@adelphia.net>

next in thread | raw e-mail | index | archive | help
I have this


      #("Scan line for word abuse,");

      if ((/(abuse\@.*?)\s/) || (/(anti-spam\@.*?)\s/))
      {
       if (${1} eq "abuse\@slt.lk>") { $abuse_email =
"abuse\@slt.lk"; next; }
       if (${1} eq "abuse\@sunrise.net>") { $abuse_email =
"abuse\@sunrise.net"; next; }
       if (${1} eq "abuse\@tele2.it>") { $abuse_email =
"abuse\@tele2.it"; next; }
       if (${1} eq "abuse\@swip.net>") { $abuse_email =
"abuse\@swip.net"; next; }
       if (${1} eq "abuse\@tiscali.fr\"") { $abuse_email =
"abuse\@tiscali.fr"; next; }
       if (${1} eq "abuse\@cpcnet-hk.com\"") { $abuse_email =
"abuse\@cpcnet-hk.co"; next; }
       if ((${1} =~ /\@apnic.net/i) || (${1} =~ /\@lacnic.net/i))
       {
        next;
       }
       else
       {
        $abuse_email = ${1};
        debug("abuse_email body = $abuse_email\n");
       }
      }

How can I rewrite the
       if (${1} eq "abuse\@slt.lk>") { $abuse_email =
"abuse\@slt.lk"; next; }
       if (${1} eq "abuse\@sunrise.net>") { $abuse_email =
"abuse\@sunrise.net"; next; }
       if (${1} eq "abuse\@tele2.it>") { $abuse_email =
"abuse\@tele2.it"; next; }
       if (${1} eq "abuse\@swip.net>") { $abuse_email =
"abuse\@swip.net"; next; }
       if (${1} eq "abuse\@tiscali.fr\"") { $abuse_email =
"abuse\@tiscali.fr"; next; }
       if (${1} eq "abuse\@cpcnet-hk.com\"") { $abuse_email =
"abuse\@cpcnet-hk.co"; next; }

part so I can check the last position of what ever is found for > \
/ ) } ] and delete those unwanted characters from value that gets
loaded into $abuse_email???




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?MIEPLLIBMLEEABPDBIEGMECHGDAA.Barbish3>