reverse : bug ?
am 20.06.2005 11:56:32 von Pierre-YvesHello,
I'm building an array of directories using File::Find.
In the preprocessing, I'm putting some filters to list only the
directories I want and in the processing (wanted) I would like to
process the directories in the reverse order (the last directory
first).
Instead of doing an extra loop to rebuild a reversed array, I decided
to
simply do "return reverse @myArray" in the preprocessing.
But instead of reversing the array, it seems that it's is sorting it
out
or something because I don't get the expected result :
*** Here is the content of the array (before reverse)
/default/main/prd/intranet/thematics/th_b2e
/default/main/prd/intranet/thematics/th_b2e/tp01_topicCV1
/default/main/prd/intranet/thematics/th_b2e/th01_testCV
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 01_testCV2
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 02_testCV3
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 03_testCV4
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 04_testCV5
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 05_testCV6
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 06_testCV7
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 07_testCV8
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 08_testCV9
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 09_testCV10
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 10_testCVNew
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 11_testCVBis
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 12_testCVForLog
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 13_testCV1905
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 14_testCV2005
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 15_testCV3205
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 15_testCV3305
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 15_testCV3405
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 15_testCV3505
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/test InterW
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 15_testCV3605
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 16_testCV0206
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 17_testCV0206
/default/main/prd/intranet/thematics/th_b2e/th02_testCV
/default/main/prd/intranet/thematics/th_b2e/th02_testCV/tp02 01_testCV0206
/default/main/prd/intranet/thematics/th_b2e/th02_testCV/tp02 02_ConversionTop
ic1
/default/main/prd/intranet/thematics/th_b2e/th02_testCV/tp02 02_ConversionTop
ic1/tp020201_ConversionTopic2
/default/main/prd/intranet/thematics/th_b2e/th02_testCV/tp02 02_ConversionTop
ic1/tp020201_ConversionTopic2/tp02020101_ConversionTopic3
*** And here is the content of the array (after reverse)
/default/main/prd/intranet/thematics/th_b2e
/default/main/prd/intranet/thematics/th_b2e/th02_testCV
/default/main/prd/intranet/thematics/th_b2e/th02_testCV/tp02 02_ConversionTop
ic1
/default/main/prd/intranet/thematics/th_b2e/th02_testCV/tp02 02_ConversionTop
ic1/tp020201_ConversionTopic2
/default/main/prd/intranet/thematics/th_b2e/th02_testCV/tp02 02_ConversionTop
ic1/tp020201_ConversionTopic2/tp02020101_ConversionTopic3
/default/main/prd/intranet/thematics/th_b2e/th02_testCV/tp02 01_testCV0206
/default/main/prd/intranet/thematics/th_b2e/th01_testCV
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 17_testCV0206
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 16_testCV0206
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 15_testCV3605
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/test InterW
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 15_testCV3505
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 15_testCV3405
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 15_testCV3305
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 15_testCV3205
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 14_testCV2005
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 13_testCV1905
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 12_testCVForLog
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 11_testCVBis
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 10_testCVNew
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 09_testCV10
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 08_testCV9
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 07_testCV8
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 06_testCV7
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 05_testCV6
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 04_testCV5
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 03_testCV4
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 02_testCV3
/default/main/prd/intranet/thematics/th_b2e/th01_testCV/tp01 01_testCV2
/default/main/prd/intranet/thematics/th_b2e/tp01_topicCV1
is this a bug ???
PS: I'm using perl 5.8.2 on Solaris 5.8.
Regards,
P-Yves.