#!/usr/bin/perl -l use strict; use warnings; use Net::IP qw/:PROC/; use Data::Dumper::Concise; my $netip = new Net::IP ('157.166.255.18') or die (Net::IP::Error()); print Dumper( "IP : " . $netip->ip(), "Sho : " . $netip->short(), "Bin : " . $netip->binip(), "Int : " . $netip->intip(), "Mask : " . $netip->mask(), "Last : " . $netip->last_ip(), "Len : " . $netip->prefixlen(), "Size : " . $netip->size(), "Type : " . $netip->iptype(), "Rev : " . $netip->reverse_ip(), "Pre : " . $netip->is_prefix(), ); print Dumper( $netip );