John W. Krahn wrote:
> wrote:
>
>>I use a old Perl script using Dirhandle but the sort is different on
>>Windows and on Linux
>>
>> $dh = new DirHandle($test) || return;
>> while ($OneFile = $dh->read()) {
>>
>>In Windows the directory and files are sorted by name : it is OK
>>but on Linux there are sorted in order of directory
>>creation/modification date but we want it by name.
>
>
> The DirHandle module is just an OO wrapper around Perl's built-in
> opendir/readdir/rewinddir/closedir functions and these functions do notdo any
> sorting. If you want the results sorted you will have to do it yourself.
>
> perldoc -f sort
Which is sensible, because if you don't want them sorted, how would you
un-sort 'em?
--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett