in reply to Sorting Arrays Without using SORT function

Actually, you do want to use sort. It's exponentially faster when used by itself. I think that you just need a quick way to do your array. Try this:
#!/usr/bin/perl use strict; use warnings; my @array = qw( one.txt 1.txt two.log 2.log); @array = sort( @array ); print "@array\n"; sub sort { sort { $a cmp $b unless $a <=> $b; } @_; }