in reply to using system() and putting results into an array
open my $PIPE, '-|', 'diff', $file1, $file2 or die "Cannot open pipe f +rom 'diff' $!"; my @diffs = map { s/^[><]//; $_ } <$PIPE>; close $PIPE or warn $! ? "Error closing 'diff' pipe: $!" : "Exit status $? from 'diff'";
|
|---|