hi~
大家好!最近在工作中遇到了一个问题。
#!perl -w
use strict;
my @array=('a','b','c','d','e','f');
my @array_2;
for(@array)
{
push @array_2,shift @array;
}
for(@array)
{
print $_;
}
我希望看到的...@array内被清空,@array_2被填满。可是情况确...@array中存在d,e,f。
请教一下大家,如何才能达到我想要的目的?
还有,为什么存在的是def,而不是b.d.f
谢谢!
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“PerlChina 论坛”论坛。
要在此论坛发帖,请发电子邮件到 [email protected]
要退订此论坛,请发邮件至 [email protected]
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---