Solved

list of list

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

  can @all = (@a, @b) such that
  @all[0] = (1,2,3) and @all[1] = (4,5)??
0
Comment
Question by:agnesko
  • 3
5 Comments
 
LVL 16

Accepted Solution

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

#!/usr/local/bin/perl

@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";
0
 

Author Comment

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

Expert Comment

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

Expert Comment

by:maneshr
ID: 2724173
agnesko,

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

pl. let me know.

Thanks
0
 
LVL 84

Expert Comment

by:ozo
ID: 2724835
perldoc perllol
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
perl to display a matrix report for 3-dimenional array 3 67
Perl 101 11 76
Question about @INC variable in perl 1 58
How to get all the API from website? 11 84
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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 (http://dilbert.com/strips/comic/2007-08…
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

813 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now