in reply to Re^2: Sort questions
in thread Sort questions

wube,

Cheers - L~R

Replies are listed 'Best First'.
Re^4: Sort questions
by wube (Acolyte) on Feb 01, 2005 at 14:24 UTC
    I used __DATA__ because I assumed you were getting the data to populate the array from an external file. In this case, you would only need to open a filehandle for that file and replace the <DATA> with <FILEHANDLE>.
    • You are absolutely correct. The final program will read input from an external file. But for testing purposes, I only wanted a subset. __DATA__ is a more elegant way of reading input data. Off course, being a newbie to Perl, I ended the data block with a blank line which set me off chasing shadows. Anyway, I finally realised what was causing the problem which led me to ask the __ENDofDATA__ question.
    The Schwartzian Transform is a very slick way of sorting. I like it. Sure glad you pointed it out.
    Thanks.
    wube