in reply to Re: Sort alphabetically from file
in thread Sort alphabetically from file
Thanks man but for some reason not working - I'm using a .txt file as input to sort BT<W
print sort { ($a =~ /\S+\n$/g)[0] cmp ($b =~ /\S+\n$/g)[0] } file.txt
not sure if I'm using it correctly
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Sort alphabetically from file
by BillKSmith (Monsignor) on Jun 14, 2019 at 15:54 UTC | |
Re^3: Sort alphabetically from file
by hippo (Bishop) on Jun 14, 2019 at 15:12 UTC | |
by edujs7 (Novice) on Jun 15, 2019 at 09:49 UTC |
In Section
Seekers of Perl Wisdom