M
Mark
Hi,
I'm having problems with my testing for lower case in an array element.
In the example below, my 'if' statement doesn't seem to test true for lower
case.
It falls through to the block assuming it's upper case.
Anyone know what's wrong?
Thanks.
# Try to determine case and change for consistency
if ($array[0] eq ["a-z"]) {
print "\narray[0] is lower case: $array[0]\n";
$array[0] = lc $array[0];
$array[1] = lc $array[1];
}else{
print "\narray[0] is upper case: $array[0]\n";
$array[0] = uc $array[0];
$array[1] = uc $array[1];
}
I'm having problems with my testing for lower case in an array element.
In the example below, my 'if' statement doesn't seem to test true for lower
case.
It falls through to the block assuming it's upper case.
Anyone know what's wrong?
Thanks.
# Try to determine case and change for consistency
if ($array[0] eq ["a-z"]) {
print "\narray[0] is lower case: $array[0]\n";
$array[0] = lc $array[0];
$array[1] = lc $array[1];
}else{
print "\narray[0] is upper case: $array[0]\n";
$array[0] = uc $array[0];
$array[1] = uc $array[1];
}