![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
perl
王子力
星星之火,可以燎原
展开
-
perl多线程实例(四个线程同时读MYSQL数据库获取记录)
use threads;use DBI();# input:# $_[0]: fruitnamesub fetchFruit { # Connect to the database. my $dbh = DBI->connect("DBI:mysql:database=FruitDB;host=localhost",原创 2013-08-25 12:50:16 · 1418 阅读 · 0 评论 -
perl读文件第m到n行的实例
#!/usr/bin/perluse strict;use warnings;open (IN,"testdata.dat") or die;open (OUT,">>./someRN.txt") or die;my $i=1;while () {chomp;if ($i>=2&&$i<=4) { #..1000.2000........LZ........... pri原创 2013-09-09 23:00:54 · 3726 阅读 · 0 评论 -
perl regex 取一些匹配字符串
#!/usr/bin/perluse strict;use warnings;my @array;open(my $fh, "<", "file3") or die "Failed to open file: $!\n";while() { chomp; push @array, $_;}close $fh;foreach my $line(@array)原创 2015-05-06 22:39:25 · 583 阅读 · 0 评论 -
perl regex 取一些匹配字符串
#!/usr/bin/perluse strict;use warnings;my @array;open(my $fh, "<", "file3") or die "Failed to open file: $!\n";while() { chomp; push @array, $_;}close $fh;foreach my $line(@array)原创 2015-05-06 22:40:08 · 1232 阅读 · 0 评论