ENV: TS 6.7.1 SP1
I am pulling my hair out over this script now!
I have a simple inline callout that takes a text file as input and displays it's contents in a drop down menu. I want to take the contents and sort them alphabetically and haven't been successful. I've used:
if ( open (INF, "<$listfile") ) {
my @lines = <INF>;
sort @lines;
and
if ( open (INF, "<$listfile") ) {
my @lines = <INF>;
@lines = sort { lc($a) cmp lc($b) } @lines; # alphabetical sort
The behavior is a list that starts with terms beginning in 'M', although I have many that should be listed before that. For some reason, I thought the default behavior of the sort function was to sort them alphabetically, but I guess I'm missing something.
Any thoughts would be appreciated.
TIA