首页 软件开发 代码片段 perl ( Page 13 )

perl 204

#Perl
把二进制翻译成中文/英文

#!/usr/bin/perl -w #use diagnostics; sub bin2cn{ die "Error:1001:bin2cn\n" if chop($_[0]) …

2015-12-14 339

#Perl
顺序查找

#!/usr/bin/perl use strict; use warnings; use feature qw(say); print "输入需要查找的元素:"; my $obj…

2015-12-14 159

#Perl
Perl批量编译GCC源代码

#!/usr/bin/perl #use Cwd; sub CompileAll(){ local($dir) = @_; opendir(DIR,"$dir"|| die "ca…

2015-12-14 807

#Perl
Perl 列出所有 DBI 数据源

#!/usr/bin/perl use strict; use DBI; my @drivers; @drivers = DBI->available_drivers; fo…

2015-12-14 874

#Perl
Perl 的 Win32::Spawn 使用方法

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

2015-12-14 605

#Perl
Perl 使用 XML::Simple 进行 XML 读写

use XML::Simple; my $simple = XML::Simple->new(); # initialize the object my $tree = $s…

2015-12-14 548

#Perl
Perl 写 Windows 事件日志

use Win32::EventLog; $eventLog = Win32::EventLog->new('System') || die $!; %eventRecord…

2015-12-14 883

#Perl
Perl 双路客户端

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

2015-12-14 392

#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,038

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

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

2015-12-14 741

#Perl
遍历当前目录

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

2015-12-14 862

#Perl
perl 删除过期文件

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

2015-12-14 795
1 11 12 13 14 15 17