perl 204

#Perl
perl正则典型应用

#!/usr/bin/perl use strict; use warnings; my $sql="select name,age from user where id=1"; …

2015-12-14 465

#Perl
从mysqldump全备获取指定库的sql

#!/usr/bin/perl -w use strict; use Getopt::Long qw(:config no_ignore_case); # use GetOptio…

2015-12-14 665

#Perl
查看网页源代码

use LWP::Simple; $url = 'http://网页地址'; print get($url); #另一个模块查看网页源代码 use LWP::UserAgent; …

2015-12-14 399

#Perl
生成随机字符串

#! perl use strict; use warnings; my $type=3; my $length=8; my $count=3; my @base_char=();…

2015-12-14 640

#Perl
用于比较两个文件不同的行差集

#!/usr/bin/perl -w use strict; my ($fileA,$fileB) = @ARGV; open A,'<',$fileA or die "Un…

2015-12-14 922

#Perl
netstat 的连接状态个数统计

nestat -n | perl -lane '$h{$F[5]++ if /tcp.*/;END {print "$_=>$h{$_}}" for keys %h}'

2015-12-14 341

#Perl
对syslog日志进行解析

#!Perl sub handle_syslog() { my($arg) = @_; my($result); my($pid)=0; my($prog); my $evtid=…

2015-12-14 403

#Perl
猜字游戏

#!/usr/bin/perl -w #creat on 2012-04-27 #author wanghz $im_thinking_of=int(rand 10); print…

2015-12-14 577

#Perl
使用 Perl 监控网站的性能和 uptime

****************************************************** +----------------------------------…

2015-12-14 213

#Perl
Perl 查找文件

use File::Find; use Win32::File; &File::Find::find(\&wanted,"C:\\httpd", "C:\\test…

2015-12-14 554

#Perl
Perl 使用 Mail::POP3Client 收取邮件

use Mail::POP3Client; $mail = new Mail::POP3Client("username", "password", "pop3.yourserve…

2015-12-14 761

#Perl
Perl 使用 SMTP 发送邮件一例

#!/usr/bin/perl # $Id: msg2smtp.pl,v 1.8 2007/07/29 16:30:25 polak Exp $ my $usage = qq! $…

2015-12-14 190
1 2 3 17