On Wed, 16 Nov 2005, Bob Showalter wrote: > Santosh Reddy wrote: > > > I want to convert all the files which are in dos format to UNIX format. > > perl -pi -e 's/\cM$//' * Running this on a directory of image files would be painful :-)
While dos2unix "seems" like a simple enough utility, modern versions of it should have safety features that should prevent it from damaging non-text files. Reimplementing it fully & properly in Perl is, while certainly doable, a bigger task that it may seem at first glance. If there's already a utility avilable to do exactly what you want to do, why reinvent it? Some assumption that your version of this particular wheel will be extra super duper round? Good luck with that... :-) -- Chris Devers \?Çfê ¦¸#
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>