Check out the File::Find module. It should come standard with your Perl distribution.
-----Original Message----- From: Santosh Reddy [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 11:02 AM To: 'Perl Beginners' Subject: How to do dos2unix for entire directory Hi All, I want to convert all the files which are in dos format to UNIX format. We have the command in UNIX called dos2unix but it takes file as input. But I would like give a directory as an argument to the command and it should convert all the dos files into UNIX format. And it should keep the UNIX files as it is. In a dos file we have a ^M character at the end of each line. We have to remove this character. Please send a sample code, if you can give full working code that is appreciated. Thanks Santosh. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>