hi,
I have a file that lists files and filepath such as this:
C:\foldera\file1
C:\folderb\file2
...
C:\folderc\file10
C:\folderd\file11
I'm trying to figure out a way to sort these so that they will be sorted in ascending order. I tried using perl's sort:
@sorted_array = sort { $a <=> $b } @unsorted_array
but it sorts it so that file10 is grouped with file1:
C:\foldera\file1
C:\foldera\file10
C:\foldera\file11
...
C:\foldera\file2
how would i sort this without renaming the files?
thanks,
gammaman
I have a file that lists files and filepath such as this:
C:\foldera\file1
C:\folderb\file2
...
C:\folderc\file10
C:\folderd\file11
I'm trying to figure out a way to sort these so that they will be sorted in ascending order. I tried using perl's sort:
@sorted_array = sort { $a <=> $b } @unsorted_array
but it sorts it so that file10 is grouped with file1:
C:\foldera\file1
C:\foldera\file10
C:\foldera\file11
...
C:\foldera\file2
how would i sort this without renaming the files?
thanks,
gammaman