Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: comparing elements in 2 hashes...

by ton (Friar)
on Jul 02, 2002 at 19:56 UTC ( [id://178978]=note: print w/replies, xml ) Need Help??


in reply to Re: comparing elements in 2 hashes...
in thread comparing elements in 2 hashes...

Are you looking to get a bunch of "NO" responses? If so, you should just use arrays instead of hashes. As the code is currently written, you never use the "hash-iness" of %file_list and %build_file, and you might as well replace them both with arrays.

If you are looking to only print out lines that are in both files, then you should read one file into a hash and the other into an array, then code something like this:

foreach (@myArray) { print "$_\n" if ($myHash{$_}); }
Hope this helps.

-Ton
-----
Be bloody, bold, and resolute; laugh to scorn
The power of man...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-23 20:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found