文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Get complement of the array

Get complement of the array

时间:2007-09-26  来源:spooky

Get complement of the array

#!/usr/bin/perl -w

my @all = (0..10);
my @part = qw/0 5 7 9/;

my @part_tmp = (@part, $all[-1]);
my @cmpl = ($all[0] - 1);
map { push(@cmpl, pop(@cmpl) + 1 .. $_) } @part_tmp;
print join(" ", @cmpl);

相关阅读 更多 +
排行榜 更多 +
我的城市警察局

我的城市警察局

角色扮演 下载
捕盗行纪无尽噩梦6

捕盗行纪无尽噩梦6

冒险解谜 下载
盛世天下

盛世天下

角色扮演 下载