in reply to Parsing an email address

strict would have prevented you from making the error of writing "User@domain.com". What Perl sees is the array @domain, which is empty and thus interpolates into an empty string. You want to use single quotes:

my $adr = 'User@domain.com'; ...

Replies are listed 'Best First'.
Re^2: Parsing an email address
by fisher (Priest) on Oct 03, 2010 at 13:57 UTC
    ...or, alternatively, put a backslash in front of '@':

    my $adr= "User\@domain.com";

Re^2: Parsing an email address
by halfcountplus (Hermit) on Oct 03, 2010 at 15:11 UTC

    Another thing that might help with this is using an editor with good syntax highlighting for perl -- one which will show special characters like @ when they are used inside double quotes, etc.

    Using an editor which does not have any syntax highlighting for the language you are coding in seems just plain silly.