use strict; use warnings; my $seq = "MTVLLLVVLQMWKATAGHSIAVSQDDGADDWETDPDFVNDVSEKEQRWGAKTV…
#!/usr/lib/perl -w use strict; use warnings; use Class::Struct; use Getopt::Long qw(:confi…
use 5.01; use Mojolicious::Lite; get '/update' => sub { my $self = shift; my $resp=`s…
糟糕的: my @Lines = qx(zcat $file); foreach my $line(@Lines){ .... } 漂亮的: open(FILE, '-|', "z…
#!/usr/bin/perl -w #author:shenxiaoran use strict; use Sys::Uptime; my $nbrcpu = Sys::Upti…
@a=(); #定义一个全局数组@a $a=0; #定义一个全局标量$a sub greet{ push(@a ,@_[0]); if($a==0){ print "hi ".@a…
#!/usr/bin/perl system("uname -r"); system("uname -a");
$dbh = DBI->connect('dbi:Oracle:payroll','scott','tiger'); $dbh = DBI->connect("dbi:…
(1 x ++$_) =~ /^1?$|^(11+?)\1+$/ || print "$_\n" while $_ < 1000
#!/usr/bin/perl -w use Win32::Service; $host = ''; $status = Win32::Service::GetServices($…
#!/usr/bin/perl -w use strict; use Win32::Sound; Win32::Sound::Volume(65535); while (<*…
use Socket; $site_name = 'www.oschina.net'; $address = inet_ntoa(inet_aton($site_name)); p…