use NetAddr::IP; my $ip = new NetAddr::IP('10.0.0.0/30'); print join(' ', @$ip), "\n";