perl 等待打点功能实现。休闲代码:)

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

#!/usr/bin/perl -w
use threads;
use threads::shared;

$| =1 ;
my $flag : shared = 0;
&printInfo();


sub printInfo()
{
     print("Start get remote file");
     my $thread_1 = threads->create(\&wait);
     while(1)
     {
       sleep(1);
       print(" .");
       $flag && last;
     }
     $thread_1->join();
     print("\n");
 }

sub wait()
{
   sleep(10);
   $flag = 1;
}