in reply to how do I find one number that matches in elements of same array and combine those elements?

This is an array of strings:

@array = ("1 2 3 4 5 6 7 8 10 14 15 20", "7 14 20", "21 22 23 24 40 50");

This is an array of arrays:

@array = ([1, 2, 3, 4, 5, 6, 7, 8, 10, 14, 15, 20], [7, 14, 20], [21, 22, 23, 24, 40, 50]);

This is a syntax error:

@array = (1 2 3 4 5 6 7 8 10 14 15 20, 7 14 20, 21 22 23 24 40 50);

It seems the second alternative is what you might be looking for. If yes, you should read perllol and perldsc.

  • Comment on Re: how do I find one number that matches in elements of same array and combine those elements?
  • Select or Download Code