question on reference to array slice
- From: Rick <rick.peng.du@xxxxxxxxx>
- Date: Sun, 29 Jul 2007 18:04:28 -0000
Hi, guys
In C we can store a set of pointers which point to different arrays
into an array of pointer. This way we could fast access different
array by looking it up in this pointer array. Is there anyway to do
this in Perl. I've been trying different things and no luck so far.
LIke:
@nums = (1 .. 20);
I want to store the reference to @nums[1..10] into $data[0], and the
reference to @nums[11:20] into $data[1], so that I could visit, for
example, the second set of @nums by something like $data[1][5] to get
15.
Is this possible for Perl anyway?
Any input is really appreciated!!
-PD
.
- Follow-Ups:
- Re: question on reference to array slice
- From: Ted Zlatanov
- Re: question on reference to array slice
- From: John W. Krahn
- Re: question on reference to array slice
- From: Mirco Wahab
- Re: question on reference to array slice
- From: Gunnar Hjalmarsson
- Re: question on reference to array slice
- Prev by Date: Re: Variable dump
- Next by Date: Re: question on reference to array slice
- Previous by thread: form script question
- Next by thread: Re: question on reference to array slice
- Index(es):
Relevant Pages
|