#!/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; } @_; }
In reply to Re: Sorting Arrays Without using SORT function
by Khen1950fx
in thread Sorting Arrays Without using SORT function
by PerlCool
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |