in reply to sorting comma separated value file

#!perl use strict; # Always. my $useage = "perl script.pl column# file1 file2 etc.\n"; my $column = shift @ARGV or die $useage; --$column; # zero base instead of one base. my @input; push( @input, [ split /,/ ] ) while(<>); @input = sort {$$a[$column] cmp $$b[$column]} @input; print join( ', ', @$_ ), "\n" for @input;