P is for Practical | |
PerlMonks |
Re^2: Sort alphabetically from fileby edujs7 (Novice) |
on Jun 14, 2019 at 14:43 UTC ( [id://11101353]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|