I have this set of code:
use strict;
use warnings;
my %hash = ( 5328 => 'Adorable',
26191 => '"Giraffe"',
57491 => 'Is Very',
4915 => 'Cute',);
foreach (sort { ($hash{$a} cmp $hash{$b}) || ($a cmp $b) } keys %hash)
{ print "$hash{$_}\n"; }
this will result as:
"Giraffe"
Adorable
Cute
Is Very
I need it to be ordered alphabetically, and disregard the special character before the AlphaNumeric character like in this sample:
Adorable
Cute
"Giraffe"
Is Very
Any suggestions?
<=>rather thancmpfor the second-level sort. – Matt Jacob Jan 9 at 22:15%hash(and please don't call things@arrayor%hashor$scalar). It should be rewritten. – Borodin Jan 9 at 22:44