loody wrote:
Dear all:
Hello,
I try to use perl to compare 2 binary files, one is display content
dump from Dram and another is display content calculated by my c-model
code.
I use open and binmode to open these 2 files, and use programs as
below to do the comparison
Dear all:
I try to use perl to compare 2 binary files, one is display content
dump from Dram and another is display content calculated by my c-model
code.
I use open and binmode to open these 2 files, and use programs as
below to do the comparison:
$num_pattern=read PATTERN, $tmp_gold
Does that mean I should use ne instead of !=?
BTW, is there any faster default function provide by Perl library to
compare 2 binary files?
thanks for your help,
miloody
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Check using a hash of the binary using something like MD5::Digest or
something.
On Sat, Nov 22, 2008 at 11:49 PM, loody [EMAIL PROTECTED] wrote:
Does that mean I should use ne instead of !=?
BTW, is there any faster default function provide by Perl library to
compare 2 binary files?
thanks
2008/11/23 loody [EMAIL PROTECTED]:
Does that mean I should use ne instead of !=?
BTW, is there any faster default function provide by Perl library to
compare 2 binary files?
thanks for your help,
Hi:
forget to explain my question more specifically.
I need to compare 2 YUV format image files
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?
Hope to hear from you =)
Lots of love,
Louise
--
To unsubscribe,
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.
Mr. Shawn H. Corey schreef:
Louise Hoffman:
I would like to replace the first 2 bytes from ## to BM in all the
files in a directory. The files are binary.
Use glob to get the list of files. Use open with read-write to read
the first line and replace the bytes.
I wouldn't read a line,
Dr.Ruud wrote:
Mr. Shawn H. Corey schreef:
Louise Hoffman:
I would like to replace the first 2 bytes from ## to BM in all the
files in a directory. The files are binary.
Use glob to get the list of files. Use open with read-write to read
the first line and replace the bytes.
I wouldn't
John W. Krahn schreef:
Dr.Ruud:
Mr. Shawn H. Corey:
Louise Hoffman:
I would like to replace the first 2 bytes from ## to BM in all the
files in a directory. The files are binary.
Use glob to get the list of files. Use open with read-write to read
the first line and replace the bytes.
Paul Harwood wrote:
I am trying to read a binary file with the following code:
$filename = binary_file.rpy;
open(FILE, $filename) or die can't open $filename: $!;
binmode(FILE);
binmode(STDOUT);
while (read(FILE, $buff, 8 * 2**10)) {
print STDOUT $buff;
}
I get
I need to be able read the first few lines of a binary test file (i.e. .staff form).
Does anyone
know how to do this in purl.
Sean
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Thu, 13 Feb 2003 11:49:04 -0500, Sean Sugrue wrote:
I need to be able read the first few lines of a binary test file (i.e.
.staff form).
Please define what is a line for you in a binary file.
If it is just a normal line (ending on the line separator),
you just can do the normal way,
e.g.
hi all,
i am a newbie to perl.
I have an application in C which will dump statistics (C structures) into
log files for post processing.
Can i read those log files from perl and form equivalent structures which
will help in analysing the files and generate a report on the statistics.
TIA.
--
HK said:
hi all,
i am a newbie to perl.
I have an application in C which will dump statistics (C structures) into
log files for post processing.
Can i read those log files from perl and form equivalent structures which
will help in analysing the files and generate a report on the
All e-mails and attachments are certified virus free!
- Original Message -
From: Jim [EMAIL PROTECTED]
To: John Pitchko [EMAIL PROTECTED]; Paul Johnson [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, November 06, 2002 1:06 AM
Subject: Re: Perl Unix Binary Files
On Sunday 03
PROTECTED]
| To: Paul Johnson [EMAIL PROTECTED]
| Cc: [EMAIL PROTECTED]
| Sent: Sunday, November 03, 2002 10:31 AM
| Subject: Re: Perl Unix Binary Files
|
| On Saturday 02 November 2002 18:01, you wrote:
| | On Sat, Nov 02, 2002 at 04:00:44PM -0600, John Pitchko wrote:
| | I've been racking my
On Sat, 2 Nov 2002 16:00:44 -0600, [EMAIL PROTECTED] (John Pitchko)
wrote:
Hi all.
I've been racking my brains out trying to get Perl to write binary files for me. Here
is my situation. For my
I was thinking that I would record the output from Data::Dumper into a scalar and
write this scalar
On Saturday 02 November 2002 18:01, you wrote:
| On Sat, Nov 02, 2002 at 04:00:44PM -0600, John Pitchko wrote:
| I've been racking my brains out trying to get Perl to write binary
| files for me. Here is my situation. For my Operating Systems class, we
| are designing a file system. One
virus free!
- Original Message -
From: Jim [EMAIL PROTECTED]
To: Paul Johnson [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, November 03, 2002 10:31 AM
Subject: Re: Perl Unix Binary Files
On Saturday 02 November 2002 18:01, you wrote:
| On Sat, Nov 02, 2002 at 04:00:44PM -0600, John
Hi all.
I've been racking my brains out trying to get Perl to write binary files for me. Here
is my situation. For my Operating Systems class, we are designing a file system. One
of the requirements is that the file system needs to be saved to disk as a binary
file. I have a few large array
On Sat, Nov 02, 2002 at 04:00:44PM -0600, John Pitchko wrote:
I've been racking my brains out trying to get Perl to write binary
files for me. Here is my situation. For my Operating Systems class, we
are designing a file system. One of the requirements is that the file
system needs
Hi,
I want to write a .pl that will take in filenames as
parameters, and print out whether the files are text files
or binary files.
The problem I'm having is that I can't figure out a good rule
to use while deciding whether a file is a text-file or a binary-file.
If someone has created
2:53 PM
To: [EMAIL PROTECTED]
Subject: How to check between text binary files
Hi,
I want to write a .pl that will take in filenames as
parameters, and print out whether the files are text files
or binary files.
The problem I'm having is that I can't figure out a good rule
to use
on Fri, 07 Jun 2002 23:28:44 GMT, Eric Abell wrote:
My question is this: what is the difference between c and C? I
know what perldoc says - one is a signed char and the other is an
unsigned char. So if I have the value 230, shouldn't that be illegal
for a signed 8-bit number, since the valid
I have an application that requires me to write normal string data or a
number into a binary file. For example, if I have the string ff, I
want to write the byte FF to the output file. If I have the number 1, I
want to write the byte 01 to the output file.
I have been using the pack function
Eric Abell wrote:
I have an application that requires me to write normal string data or a
number into a binary file. For example, if I have the string ff, I
want to write the byte FF to the output file.
print chr(hex(ff));
If I have the number 1, I want to write the byte 01 to the output
Hello. Im still struggling with converting a binary file to an ascii file. I just
dont understand how to use seek and unpack. I understand that one needs to know the
format of the binary file, therefore, I have pasted below FORTRAN code that reads the
ascii file and writes a binary file.
At 04:58 PM 8/15/01 -0600, Tyler Cruickshank wrote:
Hello. Im still struggling with converting a binary file to an ascii
file. I just dont understand how to use seek and unpack. I understand
that one needs to know the format of the binary file, therefore, I have
pasted below FORTRAN code
Hello.
Looking for some binary file help. I want to read, manipulate, and print (in ascii) a
binary file on a solaris 7 machine. I have looked into and tried the binmode()
function but this seems to be for older machines that differentiate between ascii and
binary files. I have tried
-Original Message-
From: Tyler Cruickshank [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 31, 2001 1:32 PM
To: [EMAIL PROTECTED]
Subject: binary files
Hello.
Looking for some binary file help. I want to read,
manipulate, and print (in ascii) a binary file on a solaris 7
that
differentiate between ascii and binary files. I have tried the following
and just get the binary form printed back out at me (the expected result):
binmode() is indeed for operating systems that differentiate between ascii
and binary, but such operating systems are not old. Even the newest
versions
To read binary files, you need to understand read(), seek() and unpack(),
as well as the underlying binary structure of the file. Peeking into the
file with a hex editor will help distinguish the ASCII bits from the rest.
If you know the C code that creates the file, that can help a lot!
Luke
Hi,
How do I read a binary file?? From this file, I need to read 16 bit values.
I have attached a sample binary file alongwith. When you are reading this
file, enable `hex edit mode'.
Any help will be deeply appreciated.
Regards,
Samba
Hello Sambamoorthy,
Thursday, July 26, 2001, Sambamoorthy Jayaraman [EMAIL PROTECTED] wrote:
SJ How do I read a binary file?? From this file, I need to read 16 bit values.
SJ I have attached a sample binary file alongwith. When you are reading this
SJ file, enable `hex edit mode'.
perldoc -f
-Original Message-
From: Sambamoorthy Jayaraman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 2:32 AM
To: [EMAIL PROTECTED]
Subject: Reading binary files
Hi,
How do I read a binary file?? From this file, I need to read
16 bit values.
I have attached a sample
36 matches
Mail list logo