Re: convert an array to hash

2002-11-28 Thread Ramprasad A Padmanabhan
No I did not mean to say I was finding this way as slow . But It has happened so many times before that there have been better ways to do things which I have been doing and many of them were so commonplace that I am suprised they didnt occur to me . So I just wanted to make sure I was not go

Re: convert an array to hash

2002-11-28 Thread Sudarshan Raghavan
On Thu, 28 Nov 2002, Ramprasad A Padmanabhan wrote: > Which is the quickest way of converting an array to hash keys > > I have an array > @ARRAY = qw ( a b c d e ); > > # Convert array to hash keys , so can easily check for exists > # The values of the hash are immaterial to me > > @HASH{@ARRAY

Re: convert an array to hash

2002-11-28 Thread Paul Johnson
Ramprasad A Padmanabhan said: > Which is the quickest way of converting an array to hash keys > > I have an array > @ARRAY = qw ( a b c d e ); > > # Convert array to hash keys , so can easily check for exists > # The values of the hash are immaterial to me > > @HASH{@ARRAY}=@ARRAY; > > >

convert an array to hash

2002-11-28 Thread Ramprasad A Padmanabhan
Which is the quickest way of converting an array to hash keys I have an array @ARRAY = qw ( a b c d e ); # Convert array to hash keys , so can easily check for exists # The values of the hash are immaterial to me @HASH{@ARRAY}=@ARRAY; foreach (@SOME_OTHER_ARRAY) { next if(exists($HAS