Monday, July 11, 2011

Converting lowercase to uppercase and uppercase to lowercase

content of perl_case.pl:

$name="HhEesssSSSSS";
#converting into uppercase
$capital=uc($name);
print "the name in uppercase is $capital.\n";
$lowercase=lc($name);
print "the name in lowercase is  $lowercase.\n";

OUTPUT:

G:\PERL_P~1>perl perl_case.pl
the name in uppercase is HHEESSSSSSSS.
the name in lowercase is  hheessssssss.
G:\PERL_P~1>

No comments:

Post a Comment