M
Mike
I'm using opendir to open a series of files in a directory, but
they're not being sorted by default the way I thought they would.
I have 3 files:
aaa.txt (765 bytes)
bbb.txt (977 bytes)
ccc.txt (10161 bytes)
I assumed that it would enter them into the array alphabetically, but
instead they went in ccc,aaa,bbb!
Is there a method to this madness? Coincidentally, it's being sorted
exactly like I want right now, but I'm not sure what will happen when
a 4th file is added.
TIA,
Mike
PS, the exact code is:
opendir FILENAMES, "$basepath";
@data= readdir FILENAMES;
closedir FILENAMES;
they're not being sorted by default the way I thought they would.
I have 3 files:
aaa.txt (765 bytes)
bbb.txt (977 bytes)
ccc.txt (10161 bytes)
I assumed that it would enter them into the array alphabetically, but
instead they went in ccc,aaa,bbb!
Is there a method to this madness? Coincidentally, it's being sorted
exactly like I want right now, but I'm not sure what will happen when
a 4th file is added.
TIA,
Mike
PS, the exact code is:
opendir FILENAMES, "$basepath";
@data= readdir FILENAMES;
closedir FILENAMES;