perl 204

#Perl
Nginx 使用 Perl 进行 IMAP 的认证

user nobody; worker_processes 1; error_log logs/error.log info; pid logs/nginx.pid; events…

2015-12-14 615

#Perl
Perl 对 Windows 注册表的操作

use Win32::Registry ; $key = "SOFTWARE\\newKey"; $HKEY_LOCAL_MACHINE->Open($key, $keyLi…

2015-12-14 562

#Perl
Perl 使用 sendmail 程序发送邮件

#!/usr/bin/perl $from="$me\@mydomain.com"; $to="you\@yourdomain.com"; $subject="Test email…

2015-12-14 590

#Perl
Perl 列举所有的 ODBC 驱动程序

use Win32::ODBC; %drivers = Win32::ODBC::Drivers(); local $" = ", "; foreach $driver (sort…

2015-12-14 238

#Perl
Perl 的 Socket 客户端获取服务器时间

#!/usr/local/bin/perl -Tw require 5.6.0; use Socket; use FileHandle; use strict; my($remot…

2015-12-14 506

#Perl
perl正则典型应用

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

2015-12-14 483

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

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

2015-12-14 686

#Perl
查看网页源代码

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

2015-12-14 416

#Perl
生成随机字符串

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

2015-12-14 659

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

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

2015-12-14 938

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

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

2015-12-14 359

#Perl
对syslog日志进行解析

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

2015-12-14 423
1 4 5 6 7 8 17