perl 204

#Perl
提取psite位点附近序列

use strict; use warnings; my $seq = "MTVLLLVVLQMWKATAGHSIAVSQDDGADDWETDPDFVNDVSEKEQRWGAKTV…

2015-12-14 466

#Perl
row模式下从binlog提取DML的回滚sql

#!/usr/lib/perl -w use strict; use warnings; use Class::Struct; use Getopt::Long qw(:confi…

2015-12-14 414

#Perl
通过web界面查询svn更新 

use 5.01; use Mojolicious::Lite;   get '/update' => sub { my $self = shift; my $resp=`s…

2015-12-14 573

#Perl
解压缩文件后按行读取并处理

糟糕的: my @Lines = qx(zcat $file); foreach my $line(@Lines){ .... } 漂亮的: open(FILE, '-|', "z…

2015-12-14 306

#Perl
perl Sys::Uptime模块使用例子

#!/usr/bin/perl -w #author:shenxiaoran use strict; use Sys::Uptime; my $nbrcpu = Sys::Upti…

2015-12-14 544

#Perl
子程序的运用

@a=(); #定义一个全局数组@a $a=0; #定义一个全局标量$a sub greet{ push(@a ,@_[0]); if($a==0){ print "hi ".@a…

2015-12-14 646

#Perl
Perl获取Linux操作系统版本

#!/usr/bin/perl system("uname -r"); system("uname -a");

2015-12-14 490

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

$dbh = DBI->connect('dbi:Oracle:payroll','scott','tiger'); $dbh = DBI->connect("dbi:…

2015-12-14 418

#Perl
正则表达式求素数

(1 x ++$_) =~ /^1?$|^(11+?)\1+$/ || print "$_\n" while $_ < 1000

2015-12-14 643

#Perl
Perl 操作 Windows 的系统服务

#!/usr/bin/perl -w use Win32::Service; $host = ''; $status = Win32::Service::GetServices($…

2015-12-14 329

#Perl
Perl 播放 wav 文件

#!/usr/bin/perl -w use strict; use Win32::Sound; Win32::Sound::Volume(65535); while (<*…

2015-12-14 320

#Perl
Perl 查询域名对应的 IP 地址

use Socket; $site_name = 'www.oschina.net'; $address = inet_ntoa(inet_aton($site_name)); p…

2015-12-14 688
1 2 3 17