Hello all,
I've done some reading on this topic and it seems there is a way to do what I want, but I'm having a difficult time wrapping my head around how I can make it work.
I have an array which is made out of a list of files in a directory. I'd like to be able to customize the sorting of the array to match a predefined list, or variable somehow.
For instance, my files names are based system names, here's an example(not the actual names):
Production1
Production2
Development1
Development2
QA1
QA2
Now, I always know what these filenames are in the array, they never change, dissappear and reappear etc. I'd like to be able to specify the order in which they are printed.
For example:
$1="Production1";
$2="Production2";
$3="QA1";
$4="QA2";
$5="Development1";
$6="Development2";
And then print them out of the array, in this specific order. Can anyone give me an example of how I could go about accomplishing this?
Any feedback is always appreciated. Thanks. 🙂
-Sys