On Sun, 2008-10-05 at 04:44 -0700, Louise Hoffman wrote: > Dear programmers > > I am new to Perl, and was wondering, if someone could help me? > > I would like to replace the first 2 bytes from ## to BM in all the > files in a directory. The files are binary. > > Can that be done easily in Perl?
Yes. Use glob to get the list of files. Use open with read-write to read the first line and replace the bytes. See: perldoc -f glob perldoc -f open and search for: <+ -- Just my 0.00000002 million dollars worth, Shawn Linux is obsolete. -- Andrew Tanenbaum -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/