in reply to How do I pass two file names to a function
will work fine. Once the file handle has reached the subroutine you can select it and read from it.open ( FILE_ONE, "foo.txt" ) || die "Unable to open foo: $!"; open ( FILE_TWO, "bar.txt" ) || die "Unable to open bar: $!"; CompareFiles ( \*FILE_ONE, \*FILE_TWO ); close ( FILE_TWO ); close ( FILE_ONE );
Update: Removed reference to Algorithm::Diff; I mis-read the question to be referring to find 'differences' between two files.
--t. alex
"There was supposed to be an earth-shattering kaboom!" --Marvin the Martian
|
|---|