http://qs1969.pair.com?node_id=584602

brusimm has asked for the wisdom of the Perl Monks concerning the following question:

I am new. New to Perl, semi new to programming. I have a new headache. here is my delima:

I want to open a file with multiple columns. (Redundant statement, seeing as how I want to sort on the first column)

I can open a file, read through it and print it to screen.

But I can't seem to locate the key process on sorting the contents of a file before printing to screen, never mind printing it to a file.

I have procured the O'reilly book, learning perl. I have scoured many websites... but I cannot connect the dot or dots to make my task come to fruition.

Hence, assistance is asked for...

Here is the code I've been using, without the sort routine:

open (SOMELIST, "somelist"); #opening standings, putting in array +SOMELIST while ($record = <SOMELIST>) { print $record; } close (SOMELIST)

Where / how does one sort somelist?
Any / all help, input, prewritten code (optimal, seeing as how my logic evades the dots connecting.) would be appreciated.