Given the file is large, you can try using Sort::External supplied with the following sortsub: sub { $index{$Sort::External::a} <=> $index{$Sort::External::b} }
Where %index is a hash with letters from the vietnamese alphabet as its keys and their corresponding positions in the alphabet as its values.