Re: assigned array to keys of hash?

2005-06-05 Thread Chris Wagner
At 07:05 PM 6/4/05 -0700, $Bill Luebkert wrote: One more using the hash slice suggestion: my %hash2; @hash2{grep /$something/, @array} = (1) x @array; I wasn't aware that u could take a slice of a hash. Interesting. I had to try it out to see if it actually worked and I came up with another

Re: assigned array to keys of hash?

2005-06-05 Thread Chris Wagner
Another way to track the insert order. Dunno which is more efficient. $x = 1; foreach $i ( grep(/$a/, @b) ) { $hash{$i} = $x++ } At 07:05 PM 6/4/05 -0700, $Bill Luebkert wrote: One more using the hash slice suggestion: my %hash2; @hash2{grep /$something/, @array} = (1) x @array; I wasn't

Re: assigned array to keys of hash?

2005-06-05 Thread Eric Amick
On Sun, 5 Jun 2005 12:05:08 -0700, you wrote: At 07:05 PM 6/4/05 -0700, $Bill Luebkert wrote: One more using the hash slice suggestion: my %hash2; @hash2{grep /$something/, @array} = (1) x @array; I wasn't aware that u could take a slice of a hash. Interesting. I had to try it out to see if

A question about Win32::OLE. Really need you help!!!

2005-06-05 Thread J aperlh
A question about Win32::OLE. Really need you help!!! There is a standalone executable written in C/C++. What I am going to do is to write a perl script to call several functions available in this executable. From the following article, I thought the job is very easy. #10 - Win32::OLE