[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 134
  • Last Modified:

list of list

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
agnesko
Asked:
agnesko
  • 3
1 Solution
 
maneshrCommented:
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
 
agneskoAuthor Commented:
This question has a deletion request Pending
0
 
maneshrCommented:
This question no longer is pending deletion
0
 
maneshrCommented:
agnesko,

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

pl. let me know.

Thanks
0
 
ozoCommented:
perldoc perllol
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now