perl 204

#Perl
Perl 创建 Windows 下的快捷方式

#!/usr/bin/perl -w use Win32::Shortcut; $ApplicationName = 'c:/winnt/system32/notepad.exe'…

2015-12-14 160

#Perl
Perl 一个超级简单的Socket服务器

#!/usr/bin/perl use warnings; use strict; use IO::Socket; # queue up no more than 5 pendin…

2015-12-14 493

#Perl
Perl 为 Festival 编写的 Emacspeak speech server

#!/usr/bin/perl # EmacSpeaks Festival # # A Emacspeak speech server for Festival written i…

2015-12-14 721

#Perl
提取psite位点附近序列

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

2015-12-14 487

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

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

2015-12-14 432

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

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

2015-12-14 594

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

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

2015-12-14 325

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

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

2015-12-14 563

#Perl
子程序的运用

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

2015-12-14 663

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

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

2015-12-14 508

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

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

2015-12-14 434

#Perl
正则表达式求素数

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

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