, yuck...
print map $_->[1],
sort {
$a->[0] cmp $b->[0]
or $a->[1] cmp $b->[1] }
map [ tr/"MATCH"/"MATCH"/, $_ ], @allmatches;
sort .
sort { $a->[0] cmp $b->[0] or $a->[1] cmp $b->[1] } ...an array...
ref, (cmp) refs, (cmp 0), .
, . . . map:
map [ tr/"MATCH"/"MATCH"/, $_ ], @allmatches
, -, no-op, tr/// ; . [: tr/// , MATCH; "block" "expr" map, $_ - - .] @allmatches , . ref, refs; MATCH , .
:
print map $_->[1], ...output from sort...;
$_->[1] .
- , ,
@allmatches , (, ) MATCH, MATCH ( ) ..
. - , . (Update: (Schwartzian Transform), " " " " ".)
print map { $_->[1] }
sort { $a->[0] <=> $b->[0] or $a->[1] cmp $b->[1] }
map { [ tr/"MATCH"/"MATCH"/, $_ ] }
@allmatches;
( .)
You say you are entangled in $aand $b. They are mainly magic variables - parameters of the sorting comparison function. The comparison should return a negative value if it $acompares less than $b, or positive if it $acompares more than $b, or zero if they compare equal ones. They ( $aand $b) are names that are used when two names are required; $_used with map(and grepother list conversion functions) where only one name is required.