首页 软件开发 代码片段 perl ( Page 14 )

perl 204

#Perl
文本生成表格

package Tools::Text::Format::FormTidy; use Exporter; our @ISA = qw(Exporter); our @EXPORT_…

2015-12-14 237

#Perl
magic square(幻方、宫格)解法实现(全)

#this is for solving the problem of magic square #!/usr/bin/perl -w use strict; #input a n…

2015-12-14 143

#Perl
perl实现端口扫描

#! /usr/bin/perl use threads; use IO::Socket::INET; use strict; my @openport; sub scan{ my…

2015-12-14 756

#Perl
kickstart file generate tool use cgi

#!/usr/bin/perl -w use CGI; my $ks_cgi=new CGI; my $ks_ip="10.10.99.103"; # auto mount cen…

2015-12-14 585

#Perl
Perl 之 DBI 执行 SQL 查询并读取结果

use DBI; my $driver="DBI:mysql"; my $database="sample_db"; my $user="root"; my $host="loca…

2015-12-14 221

#Perl
Perl 使用 Win32::Process 创建进程

#!/usr/bin/perl -w use Win32; use Win32::Process; $ApplicationName = 'c:\\winnt\\system32\…

2015-12-14 467

#Perl
Perl 的 ping

#!/usr/bin/perl use warnings; use Net::Ping; $hostname = shift @ARGV; $p = Net::Ping->n…

2015-12-14 391

#Perl
Perl 通过 ODBC 连接数据库并创建表

use Win32::ODBC; $DSN = "Email Contacts"; my $myDb = Win32::ODBC->new($DSN); if (! $myD…

2015-12-14 459

#Perl
Perl 的 gethostbyaddr 使用方法介绍

# The syntax is (name, altnames, addrtype, len, addrs) = # gethostbyaddr (inaddr, inaddrty…

2015-12-14 457

#Perl
用win32的internet模块来查看网页源代码

use Win32::Internet; use Encode; $INET = new Win32::Internet(); $file = $INET ->FetchUR…

2015-12-14 1,000

#Perl
不想做诗人的程序员不是一个好爸爸

#!/usr/bin/perl use strict; #use warnings; use encoding 'utf8'; use Data::Dumper; sub dump…

2015-12-14 403

#Perl
三行perl代码即可批量下载页面里面所有的图片

$html=`curl http://www.u148.net/article/69164.html`; @img=$html=~m{<img.*?src="([^"]*)"…

2015-12-14 309