>perl -wMstrict -le "use English; use Data::Dumper; ; my @arr = ('Z', 'B', 'A'); my %x = ( period => '2010/05', typ => 'voice', tcon => 'A,B', hcon => qq{@arr}, ); ; print qq{hcon '$x{hcon}'}; ; my @array = split /\Q$LIST_SEPARATOR/, $x{hcon}; @array = sort @array; ; $x{hcon} = qq{@array}; ; print Dumper \%x; " hcon 'Z B A' $VAR1 = { 'tcon' => 'A,B', 'period' => '2010/05', 'hcon' => 'A B Z', 'typ' => 'voice' };