文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
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);

相关阅读 更多 +
排行榜 更多 +
拼图拼拼乐

拼图拼拼乐

休闲益智 下载
有趣拼图

有趣拼图

休闲益智 下载
小花园拼图

小花园拼图

休闲益智 下载