in reply to Re: Compare Binary Files
in thread Compare Binary Files
sub files_differ { system "cmp file1 file2"; return $? >> 8; }
Windows has no "cmp" command. $? is set to 0x0100, files_differ always returns 1, even with missing files, even with identical files. Instant fail.
H:\>perl -e "system 'cmp file1 file2';print $?,' ',$? >> 8" 'cmp' is not recognized as an internal or external command, operable program or batch file. 256 1 H:\>
And by the way: Omitting quotes around the file name begs for trouble as soon as you replace the constants with variables. Using the multiple argument form of system would prevent that problem.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Compare Binary Files
by BrowserUk (Patriarch) on Sep 08, 2011 at 05:31 UTC | |
by afoken (Chancellor) on Sep 08, 2011 at 18:47 UTC | |
|
Re^3: Compare Binary Files
by pemungkah (Priest) on Sep 17, 2011 at 02:44 UTC |