client and server - use XML::Simple
Example how to sort files without dirs.