This could be more of unix question too. Since I am dealing with 'diff' within a perl script, thought of asking here.
foreach $f (@isect) { print "diffing file $f \n"; system("diff -r $some_dir/$f $other_dir/$f" ); }
isect array contains common elements of two other arrays (directories). when I do a diff between two directories for all the elements of isect, I want to ignore the identical elements (files). I want the diff to report only those files that differ.
for example one sample output would look like, as follows -
Intersect Array = 4 3 diffing file 4 4d3 < 1111 diffing file 3
In the above example, I don't want "diffing file 3" to be printed, since 'file 3' is an identical file between two arrays. I want to ignore files with no diff. I was looking for a switch for the diff command and did not find any. BTW, I don't have Diff.pm in my environment and that possibility is ruled out. Appreciate any help
In reply to Dealing with diff command within perl by surajsam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |