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.
In reply to Re: Help Sorting a CSV File
by hippo
in thread Help Sorting a CSV File
by NorthernFox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |