I have a variable ...
$server="+ASM1";
when I do uc($server)
server : uc(+ASM1
)
if i do just $server it's fine .
server : +ASM1
what's wrong with uc ?
Thanks
I have a variable ...
$server="+ASM1";
when I do uc($server)
server : uc(+ASM1
)
if i do just $server it's fine .
server : +ASM1
what's wrong with uc ?
Thanks
Can you post your actual code that prints out this line?
talashil,
Your question does not make any sense.
oky,I have code like this in a procedure ..
if ( uc($server) eq uc($1) ) {
blah ... blah ....
}
My $server value is +ASM1.
and $1 value is also : +ASM1
but from the codeline they supposed to match ( I guess) , but they are not ?
Thanks
Does one have extra spaces or unprintable characters? Try this to start:
print length($1);
print length($server);
The logic is correct:
use warnings;
$foo = '+asm1';
$foo =~ /^(.+)$/;
if (uc($foo) eq uc($1)) {
print "equal";
}
The above prints "equal". Maybe you need to chomp() $server or there are other invisible characters in one or both of the scalars you are comparing.