list of list

Posted on 2000-04-17
Last Modified: 2010-03-05
how to maintain a list of list?
  @a = (1,2,3);
  @b = (4,5);

  can @all = (@a, @b) such that
  @all[0] = (1,2,3) and @all[1] = (4,5)??
Question by:agnesko
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 16

Accepted Solution

maneshr earned 50 total points
ID: 2724153
this might be what you are looking for...


@a = (1,2,3);
@b = (4,5);

print @a,"\n"; ## print the array

## Store the reference to those arrays in another array or the master array!!
@all = (\@a, \@b);

## Print the array whose reference is stored in the 0th element of the master array.
print @{$all[0]},"\n";

Author Comment

ID: 2724154
This question has a deletion request Pending
LVL 16

Expert Comment

ID: 2724172
This question no longer is pending deletion
LVL 16

Expert Comment

ID: 2724173

did you get your solution?? why have you delete this question?

pl. let me know.

LVL 84

Expert Comment

ID: 2724835
perldoc perllol

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
perl CPAN issue 3 121
rename outfile before writing 2 76
Transforming a Soap message to a simple xml message! 10 154
how to print sub line with  sed /awk /perl in bash file 11 64
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question