Solved

list of list

Posted on 2000-04-17
5
120 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
Comment Utility
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
Comment Utility
This question has a deletion request Pending
0
 
LVL 16

Expert Comment

by:maneshr
Comment Utility
This question no longer is pending deletion
0
 
LVL 16

Expert Comment

by:maneshr
Comment Utility
agnesko,

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

pl. let me know.

Thanks
0
 
LVL 84

Expert Comment

by:ozo
Comment Utility
perldoc perllol
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
This video discusses moving either the default database or any database to a new volume.

763 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

8 Experts available now in Live!

Get 1:1 Help Now