in reply to read value from file won't pass if exists??

Hi,

First, a suggestion for future posts: you may want to surround your code in code tags. It makes reading it a bit easier.

You definately will want the chomp in there. $miss will need to be one of the keys exactly. So, if you have any other whitespace on that line in the file, it could be throwing you off too.

Also, the example you gave said you used 10.20.47.13 as the test string, which is not in your hash (you have 10.20.46.13). With that correction and the chomp, the script works fine for me. Check the file you are reading from.

Ted Young

($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)

Replies are listed 'Best First'.
Re^2: read value from file won't pass if exists??
by lcollins (Novice) on Jan 04, 2005 at 14:39 UTC
    Thanks, Sorry that ip was a typo. It works for you?? I flicked the chomp back on and still no go. Son of a gun!! I rm the file and vi'd another and it worked. (Embarassed) Thanks for the sanity check.