in reply to Help Sorting a CSV File
This almost works but it includes my first record
Notwithstanding 1nickt's excellent advice (which you should heed) there's a trivial adjustment to your script which should do what you want. Just read and print the first line before you sort the rest.
print $fDest <$fSource>;
Untested* but simple enough that hopefully the gist is obvious. BTW, it will help your cause for future posts if you wrap your code in <code> ... </code> tags as I have done here.
*Update: As AnomalousMonk has pointed out below (++) you'll need to enforce scalar context here.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help Sorting a CSV File
by AnomalousMonk (Archbishop) on Oct 04, 2019 at 15:44 UTC |