ilottl has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: OT: eregi deprecated
by Kenosis (Priest) on Mar 16, 2013 at 02:17 UTC
Re: OT: eregi deprecated
by tobyink (Canon) on Mar 16, 2013 at 06:52 UTC

    eregi("\n", $youremail) becomes preg_match("/\n/", $youremail).

    But personally, I'd replace this:

    !eregi("\r",$youremail) && !eregi("\n",$youremail)

    With this, because strpos is faster than a regexp:

    strpos("\r",$youremail)===FALSE && strpos("\n",$youremail)===FALSE

    Or even (it'll probably be faster, but it's slightly obscure):

    strpos("\r",$youremail)===strpos("\n",$youremail)
    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name