in reply to sorting a list according to numeric values using the function splice()

Are you sure that it is splice? I think it should be sort.

Regards,
Murugesan Kandasamy
use perl for(;;);

  • Comment on Re: sorting a list according to numeric values using the function splice()

Replies are listed 'Best First'.
Re^2: sorting a list according to numeric values using the function splice()
by changma_ha (Sexton) on Aug 09, 2010 at 10:49 UTC

    Actually i am a newbie in perl so practicing some of the exercises from a book. That is why i am a bit confuse because i could do sorting easily with sort(), they ask to do with the splice(), Is it possible to do with it?

      So the book is asking you to implement various sorting algorithms in perl, and to not use the built-in sort function. That makes a little more sense, if nothing else than to show why most of the time you will want to use the built-in version of sort.

      --MidLifeXis