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

代码片段 8064

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

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

2015-12-14 670

#Perl
查看网页源代码

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

2015-12-14 401

#Perl
生成随机字符串

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

2015-12-14 645

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

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

2015-12-14 925

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

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

2015-12-14 345

#Perl
对syslog日志进行解析

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

2015-12-14 407

#Perl
猜字游戏

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

2015-12-14 580

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

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

2015-12-14 216

#Perl
Perl 查找文件

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

2015-12-14 557

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

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

2015-12-14 765

#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 195

#Perl
Perl 使用 Net::SMTP 发送邮件

#!c:\perl\bin use Net::SMTP; print "Content-type: text/html \n\n"; $server = 'mail.mydomai…

2015-12-14 477
1 39 40 41 42 43 672