mirror of
https://github.com/bolucat/Archive.git
synced 2025-12-24 13:28:37 +08:00
13 lines
280 B
Perl
Executable File
13 lines
280 B
Perl
Executable File
#!/usr/bin/env perl
|
|
## ArchLinux install package via pacman: perl-net-cidr-lite
|
|
use strict;
|
|
use warnings;
|
|
use Net::CIDR::Lite;
|
|
my $cidr = Net::CIDR::Lite->new;
|
|
while (my $line=<>) {
|
|
$cidr->add($line);
|
|
}
|
|
foreach my $line( @{$cidr->list} ) {
|
|
print "<item>$line</item>\n";
|
|
}
|