Re: perl hex editor

2004-03-03 Thread John W. Krahn
Joel wrote: > > I'm trying to write a program in perl that will take a binary file, convert > it to hex, then save it to a text file. So far I'm not having any luck. The > best I've been able to do is copy the file and open it in a text editor. > Here is my code: > > #!/usr/bin/perl > > use warn

Re: perl hex editor

2004-03-04 Thread Joel
TED]> Sent: Wednesday, March 03, 2004 5:31 PM Subject: Re: perl hex editor > Joel wrote: > > > > I'm trying to write a program in perl that will take a binary file, convert > > it to hex, then save it to a text file. So far I'm not having any luck. The > > be

Re: perl hex editor

2004-03-04 Thread R. Joseph Newton
Joel wrote: > Thanks, that works perfectly. Now I just have to figure out how to turn it > back into a valid file. I tried using "pack 'b*'" but I had no luck. Any > suggestions? > > Joel Depends on how the bytes are stored at the point where you are ready to print them. Presuming numerically by

RE: perl hex editor

2004-03-04 Thread David le Blanc
> -Original Message- > From: Joel [mailto:[EMAIL PROTECTED] > Sent: Friday, 5 March 2004 10:57 AM > To: [EMAIL PROTECTED]; John W. Krahn > Subject: Re: perl hex editor > > Thanks, that works perfectly. Now I just have to figure out > how to turn it > b

Re: perl hex editor

2004-03-04 Thread John W. Krahn
[ TOFU fixed ] Joel wrote: > > From: "John W. Krahn" <[EMAIL PROTECTED]> > > > Joel wrote: > > > > > > I'm trying to write a program in perl that will take a binary file, > > > convert it to hex, then save it to a text file. > > > > Perhaps this is what you want: > > > > #!/usr/bin/perl > > use