title: How can I archive a directory in Perl like tar does in UNIX?
body: <p>I want to archive a directory (I don't know whether I can call "I want to tar a directory"). I want to preserve the access permissions at the other end when I un-tar it. I should I tackle this problem in perl.</p>
  
  <p>Thanks for the response but why I'm asking for doing it Perl is  I want it independent of the platforms. I want to transfer one big file to multiple machines. Those machines can be of any platform. I should be able to untar this tar file properly right? So I want to write my own tar and untar programs. Why I'm using Perl is to make it platform independent. So I can not use tar command by opening the shell in script and stuff like that. The <a href="http://search.cpan.org/dist/Archive-Tar" rel="noreferrer">Archive::Tar</a> module only deals with tarred file but it has no option to archive files.</p>