Quote:
Originally Posted by syg00
Doesn't pay to presume too much - does "upper/lower case" imply "ONLY upper/lower case" ?.
Stick a non alpha (say a digit) in the test string and run the tests above ...
|
Ok:
Code:
#!/usr/bin/env perl
use strict;
use warnings;
my $upper = '012 FOO9';
if ($upper eq uc($upper)) {
print "It's uppercase.\n";
}
Output:
That's the result I would have predicted (and desired). Would you want or expect a different result?