Hello Perl Monks
I am new to Perl and I am having a problem trying to compare two text files and from what I have read a hash should be able to solve my problem.
I am working on a unix system and what I am trying to do is to compare what is currently mounted against a master configuration file of what should be mounted.
I have created a file with what is currently mounted and this is looks like this. There are alot more entries than this but this is just a small sample (mount point and volume where mounted):
The master configurtation file I have which lists everything that should be mounted looks like this (there are alot more entries than this but this is just a small sample):
What I am having trouble with is creating a hash. I can read both of these two files into two separate arrays but what I am struggling with is how to output the difference.
For example I have array1 which contains master configuration of everything that should should be mounted (mount point and volume mounted on) and I want to compare this with array2 which has whats currently mounted (mount point and volume mounted on).
I basically what to be able to find whats not currently mounted as per the master configuration file.
Please can you help me I have been struggling with this for ages