perl 204

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

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

2015-12-14 458

#Perl
Perl 的 gethostbyaddr 使用方法介绍

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

2015-12-14 456

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

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

2015-12-14 999

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

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

2015-12-14 402

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

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

2015-12-14 308

#Perl
生成字符串连接文本

#!perl use strict; use warnings; #原始字符串 my $src_str='select username, userid, deptid, role…

2015-12-14 816

#Perl
根据缩进深度格式化Lua代码

package LuaTidy; # 对 Lua 代码进行缩进重排 use Exporter; our @ISA = qw(Exporter); our @EXPORT_OK = …

2015-12-14 941

#Perl
匹配服务器

#!/usr/bin/perl -w sub usage(){ print "\n"; print "Usage : perl extract_host.pl <filena…

2015-12-14 409

#Perl
dijkstra的perl实现

use strict; my @path = (); my @lastpath = (); my $count; my $inputfile = "input"; my $max …

2015-12-14 823

#Perl
查看Linux下的个人主目录文件变化

#!/usr/bin/perl use strict; use warnings; for (qw <"system" "system.bak">){ die "err…

2015-12-14 367

#Perl
Perl 使用 DBI 连接到 MySQL 数据库

$dsn = dbi:mysql:northwind; $username="root"; $password="letmein"; $dbh = DBI->connect(…

2015-12-14 429

#Perl
Perl 使用 OLE 自动化来创建 Excel 图表

#!/usr/bin/perl -w use Win32::OLE; use Win32::OLE::Const 'Microsoft Excel'; $class = 'Exce…

2015-12-14 813