in reply to printing true false values

use Socket; my $ip = '127.0.0.1'; print 'IP Validity Status:', inet_aton( $ip ) ? 1 : 0, "\n";