A
Ashish Gupta
need some help in perl please.
i am comparing two strings both of which are supposed to be equal, but
the if condition returns false.
i am pasting the debugger portion below:
DB<2> v
1052: $server_name =~ s/\s*//g;
1053: $p_server =~ s/\s*//g;
1054
1055==> if ($server_name eq $p_server){
1056: for ($i=0; $i < scalar(@login_password);
$i+=2){
1057: $login = $login_password[$i];
1058: $password =
$login_password[$i+1];
1059: $login =~ s/\s*//g;
1060: if ($login eq $p_user){
1061: chomp($password);
DB<2> x $server_name
0 'SYB_DBA61_TKD'
DB<3> x $p_server
0 'SYB_DBA61_TKD'
DB<4> s
dba_syb_lib::sfi_connection_info(dba_syb_lib.pm:1066):
1066: }
DB<4>
note that even though $server_name and $p_server seem to be equal,
the if condition returns false and we jump to the closing brace on line
1066.
thanks,
ashish
i am comparing two strings both of which are supposed to be equal, but
the if condition returns false.
i am pasting the debugger portion below:
DB<2> v
1052: $server_name =~ s/\s*//g;
1053: $p_server =~ s/\s*//g;
1054
1055==> if ($server_name eq $p_server){
1056: for ($i=0; $i < scalar(@login_password);
$i+=2){
1057: $login = $login_password[$i];
1058: $password =
$login_password[$i+1];
1059: $login =~ s/\s*//g;
1060: if ($login eq $p_user){
1061: chomp($password);
DB<2> x $server_name
0 'SYB_DBA61_TKD'
DB<3> x $p_server
0 'SYB_DBA61_TKD'
DB<4> s
dba_syb_lib::sfi_connection_info(dba_syb_lib.pm:1066):
1066: }
DB<4>
note that even though $server_name and $p_server seem to be equal,
the if condition returns false and we jump to the closing brace on line
1066.
thanks,
ashish