perl 204

#Perl
Perl 双路客户端

use IO::Socket; $socket = IO::Socket::INET->new ( PeerAddr => 'server.com', PeerPort…

2015-12-14 388

#Perl
About Matrix

#!/usr/bin/env perl6 use v6; sub MAIN(Str :f($file)) { my @lines = $file.IO.lines; my @sub…

2015-12-14 1,032

#Perl
2个线程间的对话,有点耳熟,有点忧郁

#!/usr/bin/perl use threads; use threads::shared; use Thread; use Thread::Queue; use POSIX…

2015-12-14 736

#Perl
遍历当前目录

my $path = `pwd`; chomp $path; # `pwd`命令结尾有个回车符,需要chomp去掉 print "$path\n "; opendir DIR ,$…

2015-12-14 859

#Perl
perl 删除过期文件

#!/usr/bin/perl `find /bak/ >list.txt`; open LIST,"/root/list.txt"; while (<LIST>…

2015-12-14 787

#Perl
遍历目录下所有的文件

#!perl # #作者:赵灿星 #本perl脚本用于遍历目录下所有文件,使用时请将本脚本拷贝到需要遍历的目录下,双击即可 # # use strict; use Cwd; use…

2015-12-14 949

#Perl
perl读取excel文件内容

#!/usr/bin/perl -w use strict; use feature 'say'; use Spreadsheet::ParseExcel; ####excel操作…

2015-12-14 658

#Perl
冒泡排序

#!/usr/bin/perl use strict; use warnings; use feature qw(say); my @e = qw/ 4 88 5 21 92 37…

2015-12-14 449

#Perl
根据使用频率输出dmenu的结果

#!/usr/bin/perl # sydi_dmenu --- # # Filename: sydi_dmenu # Description: This script make …

2015-12-14 289

#Perl
Perl 数据库事务处理(提交和回滚)

use DBI qw(:sql_types); my $dbh = DBI->connect('dbi:mysql:sample_db','root','password',…

2015-12-14 1,028

#Perl
Perl 根据 Windows 的错误码获取详细的描述信息

# This function takes the error number returned by the Win32::GetLastError function. #!/us…

2015-12-14 488

#Perl
Perl 使用 XML::Parser 来解析 XML 文件

use XML::Parser; my $xmlfile = "yourXML.xml"; my $parser = XML::Parser->new( ErrorConte…

2015-12-14 378