Gossamer Forum
Quote Reply
glbal.txt
Hi,

In global.txt or when viewing your globals...
is there a way to make them appear in alphabetical order..
theye are currently sorted in no what so ever order I can figure..
I have a lot of globals and sorting them in order will give me a great help..

Any ideas?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] glbal.txt In reply to
Hi,

Look in Links/Tools.pm in sub global_editor:

and change:

foreach my $code (keys %$GLOBALS) {

to:

foreach my $code (sort keys %$GLOBALS) {

and it should work.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] glbal.txt In reply to
thanks
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] glbal.txt In reply to
The solution worked just fine..
Just a small issue
The globals will be listed where the CAP letter globals are listed first then the smalla cab.

EXample:
Body
Search_count
User
hits
meta_tag


Can that be changed so the global listing will not do that?


Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] glbal.txt In reply to
Try:

foreach my $code (sort lc keys %$GLOBALS) {
Quote Reply
Re: [RedRum] glbal.txt In reply to
thanks
Nice try

the lc will actually make all your globals disappear..
you almost got mePirate
Tongue
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] glbal.txt In reply to
Sorry I wasn't concentrating use:

foreach (sort { lc($GLOBALS->{$a}) cmp lc($GLOBALS->{$b}) } keys %$GLOBALS) {

Last edited by:

RedRum: Nov 13, 2001, 4:04 PM
Quote Reply
Re: [RedRum] glbal.txt In reply to
Thanks RedRum
But that did not do it either..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] glbal.txt In reply to
Yes it does, I tried it myself before posting.