in reply to Synchronizing a directory between devices
Sounds like you should be reading about Unison. Unless, you really want to implement your own solution, unison is really slick (and it's perfectly happy to work cross platform -- at least between linux & windows.)
PS: You really should improve your titling of this node.
In Section
Seekers of Perl Wisdom