Re: print 2 array elements

2012-09-05 Thread Dr.Ruud
On 2012-09-05 12:47, jet speed wrote: output --- abc-12 20/1 def-22 30/22 ghi-33 40/3 def-22 20/1 @array1 ="abc-12, def-22, ghi-33,abc-12,def-22"; @array2 ="20/1, 30/22, 40/3, 20/1"; i did try to map array1 to array2 elements, did'nt work. %hash = map {$array1[$_] => $array2[$_] } (0

Re: print 2 array elements

2012-09-05 Thread jet speed
Thanks Sholmi. Appreciate your help !. that's correct, i did make up the syntax, bec's the actual program is in a different system, were i cannot access mail. Cheers Sj On Wed, Sep 5, 2012 at 12:10 PM, Shlomi Fish wrote: > Hi jet speed, > > On Wed, 5 Sep 2012 11:47:41 +0100 > jet speed wrot

Re: print 2 array elements

2012-09-05 Thread Shlomi Fish
Hi jet speed, On Wed, 5 Sep 2012 11:47:41 +0100 jet speed wrote: > Hi All, > > I would like to print array1 with array2 as below ex: > > output > --- > abc-12 20/1 > def-22 30/22 > ghi-33 40/3 > def-22 20/1 > The best way would be to iterate over the indexes: for my $idx (0 .. $#arr