uninitialized value in multidimensional array

uninitialized value in multidimensional array

am 17.04.2008 18:06:29 von dave

I've the following perl :

my @Table = ([],[],[],[]);

push ( @Table, 'text1', 'test2', 'text3','text4');

foreach my $next (@Table))
{

Re: uninitialized value in multidimensional array

am 17.04.2008 18:15:13 von RedGrittyBrick

dave wrote:
> I've the following perl :
>
> my @Table = ([],[],[],[]);
>
> push ( @Table, 'text1', 'test2', 'text3','text4');
>
> foreach my $next (@Table))
> {
>

Nuke it from orbit.

--
RGB

Re: uninitialized value in multidimensional array

am 17.04.2008 19:43:23 von Sherm Pendley

dave writes:

> I've the following perl :
>
> my @Table = ([],[],[],[]);
>
> push ( @Table, 'text1', 'test2', 'text3','text4');
>
> foreach my $next (@Table))
> {

And your question is... ?

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net

Re: uninitialized value in multidimensional array

am 17.04.2008 21:35:05 von Jim Gibson

In article
<9426ddef-01bb-43bb-a62f-db50560fc5fb@f63g2000hsf.googlegroups.com>,
dave wrote:

> I've the following perl :
>
> my @Table = ([],[],[],[]);
>
> push ( @Table, 'text1', 'test2', 'text3','text4');
>
> foreach my $next (@Table))
> {

That is not a valid Perl program, so I can't tell what it is you are
trying to do, or under what circumstances you are getting the error
message in your subject line.

I suggest you use Data::Dumper to see what you have in @Table:

use Data::Dumper;
print Dumper(\@Table);

It might be illuminating.

Please read the guidelines for this group and try to adhere to them.
Thanks.

--
Jim Gibson

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
http://www.usenet.com