perl thread
#!/usr/local/bin/perl
use threads; @domain = ("tom.com", "chinadns.com", "163.com", "aol.com");
for ($i=;$i<;$i++)
{
print $i.'.'.$domain[$i].' ';
}
print "\n"; my $thr0 = threads->new(\&checkwhois, '0', $domain[]);
my $thr1 = threads->new(\&checkwhois, '1', $domain[]);
my $thr2 = threads->new(\&checkwhois, '2', $domain[]);
my $thr3 = threads->new(\&checkwhois, '3', $domain[]); sub checkwhois()
{
my ($l,$r)=@_;
my $i=;
while($i<)
{
$i*$i;
$i++;
}
print "done --$l\t\n";
print $l.$r." query successful! \n";
} $thr0->join;
$thr1->join;
$thr2->join;
$thr3->join;
perl thread的更多相关文章
- centos 7.0 phpize 扩展php
phpize扩展php模块 phpize 所在目录 /usr/etc/php/bin/phpize 查看当前php配置情况 /usr/etc/php/bin/下面的php [root@localhos ...
- 服务管理之httpd
目录 1. httpd简介 2. httpd版本 2.2 httpd-2.4新增的模块 3. httpd基础 3.1 httpd自带的工具程序 3.2 rpm包安装的httpd程序环境 3.3 web ...
- FastDFS + Nginx代理方式访问
FastDFS + Nginx代理方式访问 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.在storage上安装nginx 1>.下载nginx软件(http://ngi ...
- Redis笔记 -- 在 Centos7.4单机中部署Redis集群(二)
0x00--背景和目的 在单台PC服务器上部署Redis集群,通过不同的TCP端口启动多实例,模拟多台独立PC组成集群. 0x01--环境描述: Centos版本:CentOS Linux relea ...
- centos 上安装redis 3.0.5
官网下载安装包,直接使用make编译,报如下错误 : [root@localhost redis-3.0.5]# make cd src && make all make[1]: 进入 ...
- Httpd服务进阶知识-LAMP源码编译安装
Httpd服务进阶知识-LAMP源码编译安装 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 想必大家都知道,动态资源交给fastcgi程序处理,静态资源依旧由httpd服务器处理 ...
- Linux系统WEB服务之Nginx基础入门
一.Nginxi简介 Nginx是什么?它是一个开源.高性能的WEB服务器软件和代理服务器软件,由俄罗斯人Igor Sysoev 开发实现.它的功能主要分三类,第一是它作为一个WEB服务软件使用:第二 ...
- Redis简介与部署
一.简介 Redis是什么?redis是一款基于BSD协议,开源的非关系型数据库(nosql数据库),作者是意大利开发者Salvatore Sanfilippo在2009年发布,使用C语言编写:red ...
- Memcached高可用组件之repcached
在前边的tomcat session server msm的那篇博客我们用memcached做tomcat session服务器,默认官方memcached是不支持主从同步的,为了解决memcache ...
随机推荐
- document.styleSheets[0]是个啥
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- OSChina中远程GIT仓库同步探索
GIT平台在OSChina中的搭建帮了我们很大的忙,但如何将本地GIT仓库上传至OSChina的远程仓库,相信这是一个艰难的坎,今天我就在此总结我的成功经验,帮助大家,共同学习.由于条件有限,我全部的 ...
- [AFUI]App Framework Quickstart
---------------------------------------------------------------------------------------------------- ...
- Solum入门知识(编辑中)
概要 参考:https://wiki.openstack.org/wiki/Solum An OpenStack project designed to make cloud services eas ...
- KMP算法模板
不懂的话推荐看这篇博客,讲的很清楚 http://blog.csdn.net/v_july_v/article/details/7041827 #include<iostream> #in ...
- Ov
- CSS 中 display:inline-block 属性使用详解
本文详细描述了display:inline-block的基础知识,产生的问题和解决方法以及其常见的应用场景,加深了对inline-block应用的进一步理解. 基础知识 display:inline- ...
- HTTP MIME类型即HttpResponse.ContentType属性值列表
MIME-Typ Dateiendung(en) Bedeutung application/acad *.dwg AutoCAD-Dateien (nach NCSA) application/ap ...
- ct任务添加与中控机批量后台操作
ct 任务nohup sh ./bin/start.sh </dev/null >/dev/null 2>&1 & 中控机批量 for h in `get_hosts ...
- LiveView 0.8 RC1 could boot evidence files acquired from Win10 64bit
The latest Windows 10 will be more and more popular in the very near future. Now let's take a look i ...