| | Perl question
|
| Any nice easy way to make a string all lower case? ("nice easy way" being defined as being less than 5 lines...)I seem to remember being able to use 'pack' to do that in some fashion or another... and of course I foolishly tried: "$string =~ (...) (25 years ago, 4-Oct-99, to lugnet.off-topic.geek)
| | | | Re: Perl question
|
| (...) Try this: $string = lc $string; Alternatively, I think this will work also: $string =~ tr/[A-Z]/[a-z]/; But if you *REALLY* want to make it look impressive (to a 1st-year programmer anyway :-), you could do: @upchars = qw( A B C D E F G H I J (...) (25 years ago, 4-Oct-99, to lugnet.off-topic.geek)
| | | | Re: Perl question
|
| (...) Doh! I had no idea there was a function to do it already! DaveE (25 years ago, 5-Oct-99, to lugnet.off-topic.geek)
| |