in reply to Re: Comparing lower to upper case
in thread Comparing lower to upper case

My statement looks like this:
$fields[[0]] = uc($fields[[0]]);

However, it does change this: 7f8954 into 7F8954.
Id there a way to explicitely change just the one letter to uppercase?

SORRY! It should say that it does NOT convert 7f8954 to 7F8954

Replies are listed 'Best First'.
Re: Re: Re: Comparing lower to upper case
by joshua (Pilgrim) on Jun 11, 2002 at 19:50 UTC
    However, it does change this: 7f8954 into 7F8954.
    What? I thought that's what you wanted it to do...

    SORRY! It should say that it does NOT convert 7f8954 to 7F8954
    I'm confused now. You mean $fields[0] = uc($fields[0]); isn't converting 7f8954 to 7F8954?

    $fields[0] = "7f8954"; $fields[0] = uc($fields[0]);

    $fields[0] should now have a value of "7F8954"

    $fields[0] =~ tr/a-z/A-Z/; will also work.

    Joshua