Re: Can't create 2d array in Perl





while(<FH>)
{

push @arr , split /\t/ ;

}



Hello,
Here you don't create a 2d array.Maybe you want this:

while(<FH>) {
push @arry,[split/\t/];
}

Then each element of @arry is a anonymous array.You can access the anonymous array's elements as:

print $arry[0]->[0];

Hope this helps.

--
Jeff Pang
NetEase AntiSpam Team
http://corp.netease.com
.