L
L. Hao
Hello, I am new to Perl. What I am trying to do is to get and parse the
result of a system function execution. But I am not sure how to do it.
The system function is the file comparison, cmp, i.e.
system(" cmp -xl $file1 $file2") && die "failed"
If the file1 and file2 are not identical, cmp returns the detailed
differences by bytes. What do I need to do to get this results and parse
them in Perl? To be specific about parsing, I'd like to get the index of
differences.
Thanks a lot.
Li
result of a system function execution. But I am not sure how to do it.
The system function is the file comparison, cmp, i.e.
system(" cmp -xl $file1 $file2") && die "failed"
If the file1 and file2 are not identical, cmp returns the detailed
differences by bytes. What do I need to do to get this results and parse
them in Perl? To be specific about parsing, I'd like to get the index of
differences.
Thanks a lot.
Li