Reference
Acme::Web20naoyaのはてなダイアリー - Acme::Web2dot0::Validator
http://d.hatena.ne.jp/naoya/20051113/1131906445
#!/usr/bin/env perl
use Date::Simple ('date','today');
my $HOME = q(/path/to/home);
my $BACKUP_DIR = $HOME.q(/backup);
my $tar = q(/bin/tar);
$date = today();
# print "$tar czvf $HOME/$date.tar.gz $HOME/public_html $HOME/work\n";
`$tar czvf $BACKUP_DIR/home-$date.tar.gz $HOME/public_html $HOME/work`;
`$tar czvf $BACKUP_DIR/www-$date.tar.gz /var/www`;
# aptitude install libnet-dns-perl
#!/usr/bin/perl
use Net::DNS;
my $res = Net::DNS::Resolver->new;
while (<>){
chomp;
my $host = $_;
my $query = $res->search($host);
if ($query) {
foreach my $rr ($query->answer) {
next unless $rr->type eq "A";
my $address = $rr->address;
printf("%-20s : %14s\n" ,$host,$address);
}
} else {
warn "query failed: ", $res->errorstring, "\n";
}
}
$ cat list
www.example.com
www.exmaple.net
www.example.org
$ nslookuper.pl < list
www.example.com : 192.0.34.166
www.example.net : 192.0.34.166
www.example.org : 192.0.34.166
sub func($$@){
my($a,$b,@list)=@_;
}
&func($a,$b,@list);
# aptitude install libspreadsheet-parseexcel-perl