develooper Front page | perl.beginners | Postings from February 2002

Re: array references

Thread Previous | Thread Next
From:
Andrea Holstein
Date:
February 13, 2002 14:48
Subject:
Re: array references
Message ID:
pan.2002.02.13.23.33.18.399365.1916@yahoo.de
In article <20020213213854.45329.qmail@onion.perl.org> wrote "Jon Serra" <jonserra@hotmail.com>:

> Greetings,
> 
>         I have an array, each element will contain a reference to another array. How
> can I dynamically generate each of those references such that each reference is unique. I am
> trying to create dynamic 2d arrays.  TIA JON

Is
my @array = map { [] } (1..$array_size);
or
my @array; push @array, [] for (1..$array_size);
what you want ?

Greetings,
Andrea

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About