[EMAIL PROTECTED] wrote:

> Hi All,
>
> I'm passing a hash to a subroutine like this:
>       subname("a" => 123, "b" =>"fff", "C" => "joyjoyjoy");

Hi Peter,

You probably sholdn't be doing this.  Keys, whether in a hash or a database table, are 
primary references.  They should not be modified after insertion.  *They are not 
data*. They are program structures.  Insert the key into a hash exactly in the form by 
which you would like to later reference it.  Any modification operations should take 
place only on the values.

>
>
> On the receiving side I want all keys to be upper case.  I can map like
> this:
>       sub subname{
>             map {$_ =~ tr/a-z/A-Z/} @_;
>             my %values = @_;
>             ..
>       }
>
> and I can live with that I guess.  But really I just want to push the keys,
> not the values, into upper case.
>
> Is there a way to just map the keys?  I can't think of one.
>
> TIA,
> Peter

Probably just as well.  Is there some context where you anticipate having to repair 
broken keys after the fact?

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to