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

I am using Net::FTP which successfully logs into other FTP sites, but will not log into a site that contains an '@' symbol in the password.

I have tried escaping the character, using octal/hex/ascii number versions in the string, and a couple of other things.

Anyone have any ideas how to process that character?

Pertinent code is:

$host = "hostname"; $user = "user"; $psswrd = "xxx@xxx"; $ftp->login($user,$psswrd) or $newerr = 1;

Replies are listed 'Best First'.
Re: Net::FTP non-alphanumeric character
by toolic (Bishop) on Jul 14, 2011 at 00:22 UTC
    If you use warnings, you will get a helpful message:
    Possible unintended interpolation of @xxx in string at
    The quickest thing to try is to avoid interpolating the @ using single quotes:
    $psswrd = 'xxx@xxx';