in reply to
Sorting The Date format Values without using any perl modules.
This answer is intentionaly vague since your data changed twice and I have no idea which to use, and it appears this is some sort of homework because of the strange no split suggestion. If you can't use split, then look for some way to split a string without using split. One way would be to use substr instead.
my $test = "Hello World";
my $new = substr($test, 6,5) . "-" . substr($test,0,5);