Solved

list of list

Posted on 2000-04-17
5
126 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
[X]
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
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

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 (http://dilbert.com/strips/comic/2007-08…
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