in reply to Re^2: File pairing from different directories
in thread File pairing from different directories
By "canonicalize the names to a common form", I mean to convert the names into a common form, throwing away all the parts that identify the environment the files came from. In your case, that means throwing away at least .alphaprod and .gammaprod. Your substring approach does that (and a bit more) - it will throw away xml.alphaprod and xml.gammaprod, which should be OK for your purpose.
You don't need to use grep, which will look at every element in the other list. By putting each list into a separate hash (I usually call them %left and %right, and mean to have the elements on the left side of the comparison in %left), you allow Perl to skip looking through all elements and to directly see whether an element exists.
|
|---|