#!/usr/bin/perl -w
use strict;
use FindBin;
use lib '/mnt/lustre/user/wubin/01.Program/Scripts/01.script/GeneLab';
use Common;
my $common = Common -> new();
my @a = (1,2,3,4,5,6);
my @b = (7,8,9);
print "round0:\n";
print "\@a:\t@a\n";
print "\@b:\t@b\n";
my $count = 0;
my @a_tmp = @a;
foreach my $sh(@a){
$count ++;
print "round$count:\n";
if(@b<6){
$common -> save_in_array(\@b, $sh);
$common -> remove_from_array(\@a_tmp, $sh);
print "\@a:\t@a\n";
print "\@a_tmp:\t@a_tmp\n";
print "\@b:\t@b\n";
}
}
一边循环,一边删添,结果有点意外
最新推荐文章于 2024-11-03 06:12:22 发布