in reply to Re: Comparing Hash's key to an <STDIN> and print it's corresponding value in thread Comparing Hash's key to an <STDIN> and print it's corresponding value
totally agree!
both values are not needed, I forgot to remove them while modifying the same file to create different scenarios!
I believe in your alternative solution, the if condition works the same as 'exist' the return value from that is 1 when the key is actually found, and 0 if not. hence, it would print the equivalent value for that particular key if it exists! correct me if I'm wrong!
thanks for the reply my friend!
|