P
Paul
hi, there,
I met a wired problem when using <STDIN>, here is my script,
use Mail:
OP3Client;
use strict;
use warnings;
my $pop;
my $username;
my $password;
my $hostname;
my $SSLFag;
print "Input your username:\n";
$username=<STDIN>;
print "Input your password:\n";
$password=<STDIN>;
print "Input your hostn:\n";
$hostname=<STDIN>;
print "Input your username:\n";
$username=<STDIN>;
print "Using SSL? 1 or 0:\n";
$SSLFlag=<STDIN>;
$pop = Mail:
OP3Client->new(USER => $usernane',
PASSWORD => $password,
HOST => $hostname,
USESSL => $SSLFlag);
#$pop = Mail:
OP3Client->new(USER => 'myname',
# PASSWORD => 'password',
# HOST => 'mail host name',
# USESSL => 1);
if(!$pop)
{
print "Canot log in the pop3 server\n";
die ;
}
The problem is that if I use <STDIN> to get all four parameters and
pass them to the new function, this script will not work and no error
report. If I direct use the parameters like in the commented scripts,
it works very well.
Can you guys answer me?
Paul
I met a wired problem when using <STDIN>, here is my script,
use Mail:
use strict;
use warnings;
my $pop;
my $username;
my $password;
my $hostname;
my $SSLFag;
print "Input your username:\n";
$username=<STDIN>;
print "Input your password:\n";
$password=<STDIN>;
print "Input your hostn:\n";
$hostname=<STDIN>;
print "Input your username:\n";
$username=<STDIN>;
print "Using SSL? 1 or 0:\n";
$SSLFlag=<STDIN>;
$pop = Mail:
PASSWORD => $password,
HOST => $hostname,
USESSL => $SSLFlag);
#$pop = Mail:
# PASSWORD => 'password',
# HOST => 'mail host name',
# USESSL => 1);
if(!$pop)
{
print "Canot log in the pop3 server\n";
die ;
}
The problem is that if I use <STDIN> to get all four parameters and
pass them to the new function, this script will not work and no error
report. If I direct use the parameters like in the commented scripts,
it works very well.
Can you guys answer me?
Paul