Certainly. You can feed sort a block that tells it how to do the sorting:
use strict; my @origarray=('1|:|Test','2|:|Hash','3|:|Stuff','4|:|India'); print join("\n",sort {(substr $a,4) cmp (substr $b,4)} @origarray);
In reply to Re: Substring Sort
by myocom
in thread Substring Sort
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |