Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: How to find the difference between two text files using a hash array

by Kenosis (Priest)
on Jan 21, 2013 at 01:28 UTC ( #1014368=note: print w/ replies, xml ) Need Help??


in reply to Re^2: How to find the difference between two text files using a hash array
in thread How to find the difference between two text files using a hash array

Below generates the same results w/o using the module:

use strict; use warnings; my @array1 = split /\n/, <<END1; /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 END1 my @array2 = split /\n/, <<END2; /home filer1232:/vol/home1 /mystuff filer1233:/vol/project /data filer1234:/vol/example_data /tools filer1235:/vol/my_tools END2 my %currMounted = map { $_ => 1 } @array2; print "$_\n" for grep !$currMounted{$_}, @array1;


Comment on Re^3: How to find the difference between two text files using a hash array
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014368]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2015-07-31 06:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls