in reply to Re^2: Sorting array
in thread Sorting array
I really can't tell what the problem is.
The problem is you gave fake data for your problem instead of real data.
fake data => fake solution
(not to mention wasting time).
#!/usr/bin/perl -l # http://perlmonks.org/?node_id=1177217 use strict; use warnings; my @ar1=qw(F40_I_VBBG_RI50-FMVSS301n-2SR424M-HCH-D_01EK101.a3db F40_I_VBBG_RI50-FMVSS301n-2SR424M-HCH-D_01EK101a.a3db F40_I_VBBG_LR50-ECR17p-2SR424M-HCH-D_01EK101g.a3db F40_I_VBBG_LR50-ECR17p-2SR424M-HCH-D_01EK101k.a3db F40_I_VBBG_LR50-ECR17p-2SR424M-HCH-D_01EK101.a3db ); print for values %{{ map { /(.*\d)[a-z]?\./, $_ } sort @ar1 }};
|
|---|