in reply to printing true false values

You have an answer to your immediate problem, however....

Matching a valid IP address is not quite as simple as it might seem at first. For example, your regex would match 999.999.999.999, which is certainly not a valid IP.

Rather than trying to roll your own, you might want to take a look at Data::Validate::IP - all the tough work has been done for you.

Cheers,
Darren :)

Replies are listed 'Best First'.
Re^2: printing true false values
by HarshaHegde (Sexton) on Dec 30, 2007 at 16:11 UTC
    Thanks a lot Darren. This is definitely the best solution.