RE: Obtaining a slice of unique values from an array

2002-07-01 Thread Shishir K. Singh
: [EMAIL PROTECTED] Subject: RE: Obtaining a slice of unique values from an array on Mon, 01 Jul 2002 13:45:30 GMT, [EMAIL PROTECTED] (Shishir K. Singh) wrote: > This is the example "d" cited in perldoc -q duplicate > d) A way to do (b) without any loops or greps: [line numbers add

RE: Obtaining a slice of unique values from an array

2002-07-01 Thread Felix Geerinckx
on Mon, 01 Jul 2002 13:45:30 GMT, [EMAIL PROTECTED] (Shishir K. Singh) wrote: > This is the example "d" cited in perldoc -q duplicate > d) A way to do (b) without any loops or greps: [line numbers added for reference] > 01undef %saw; > 02@saw{@in} = (); > 03@out = sor

Re: Obtaining a slice of unique values from an array

2002-07-01 Thread Sudarsan Raghavan
"Shishir K. Singh" wrote: > >on Sun, 30 Jun 2002 12:08:23 GMT, Dan Fish wrote: > > > What is the most efficient (or at least AN efficient :-) way of > > obtaining a slice from an array wherein the slice contains only > > unique values found in the array? > > >See > > perldoc -q duplicate >

RE: Obtaining a slice of unique values from an array

2002-07-01 Thread Shishir K. Singh
>on Sun, 30 Jun 2002 12:08:23 GMT, Dan Fish wrote: > What is the most efficient (or at least AN efficient :-) way of > obtaining a slice from an array wherein the slice contains only > unique values found in the array? >See > perldoc -q duplicate -- >felix This is the example "d" cited

Re: Obtaining a slice of unique values from an array

2002-06-30 Thread Jeff 'japhy' Pinyan
On Jun 30, Dan Fish said: >What is the most efficient (or at least AN efficient :-) way of obtaining a >slice from an array wherein the slice contains only unique values found in >the array? >if @array = (1,3,5,5,3,5,2,1) then @slice = (1,3,5,2) This is FAQ. perldoc -q unique Found in /u

Re: Obtaining a slice of unique values from an array

2002-06-30 Thread Felix Geerinckx
on Sun, 30 Jun 2002 12:08:23 GMT, Dan Fish wrote: > What is the most efficient (or at least AN efficient :-) way of > obtaining a slice from an array wherein the slice contains only > unique values found in the array? See perldoc -q duplicate -- felix -- To unsubscribe, e-mail: [EMAI

Obtaining a slice of unique values from an array

2002-06-30 Thread Dan Fish
What is the most efficient (or at least AN efficient :-) way of obtaining a slice from an array wherein the slice contains only unique values found in the array? I.E. if @array = (1,3,5,5,3,5,2,1) then @slice = (1,3,5,2) Thanks, -Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition