in reply to How to find the difference between two text files using a hash array
outputuse strict; use warnings; use Data::Dumper; my @config = ( '/home filer1232:/vol/home1', '/mystuff filer1233:/vol/project', '/data filer1234:/vol/example_data', '/software filer1255:/vol/my_software', '/tools filer1235:/vol/my_tools', '/docs filer146:/vol/my_documents', ); my @mounted = ( '/home filer1232:/vol/home1', '/mystuff filer1233:/vol/project', '/data filer1234:/vol/example_data', '/tools filer1235:/vol/my_tools', ); my %diff; @diff{@config}=(); delete @diff{@mounted}; print Dumper [keys %diff];
$VAR1 = [ '/docs filer146:/vol/my_documents', '/software filer1255:/vol/my_software' ];
(EDIT:repaired FAQ link)
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to find the difference between two text files using a hash array
by NewLondonPerl1 (Acolyte) on Jan 20, 2013 at 22:05 UTC |