AITHA, BHEEMSEN (SBCSI) wrote: > Hi list, > > I would like to create an array in the following format: > > > 123 abc,xyz,pqr > 234 xyz > 456 wer,tre > --- > --- > > I want to use a command like the following > > push @first_array, <the_number> <tab> <group of words separated by commas > from second_array>; > > where the_number = values in 1st column coming from a variable in a loop. > The values in second column are a list of complete elements from > second_array. abc, xyz, pqr etc.. are individual elements in second_array. I > also don't know how to insert commas in between the individual elements ( > i.e. a comma between abc and xyz and so on while creating the array). Every > time after writing a row I will be deleting all the elements in second_array > with $#second_array = -1. The loop will push new values into second_array > before writing a new row into the first_array.
If you really want some help, create a code snippet with all of the arrays defined and containing some values (init them - don't read any data files that we don't have). Then create the output array as you would expect to have it created (again just make it a static init of an array). Show the looping part of it to. With that done, we should be able to figure out exactly what you want and where the data/vrbls are coming from. -- ,-/- __ _ _ $Bill Luebkert ICQ=14439852 (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl) -/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/ _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs