ashylarry has asked for the wisdom of the Perl Monks concerning the following question:
I have a file containing about 1000 or so out of sequence numbers in a single column that I need to do the following with:
Convert the list of numbers from file "list.txt":
125
23
291
95
5
etc...
to a two-column list of all possible number pairings:
125 23
125 291
125 95
125 5
23 291
23 95
23 5
291 95
291 5
95 5
etc...
Can anyone provide me a script that would do this? I know it would involve putting the numbers into an array and then iterating over the array in a nested loop, but I have no idea how to actually code this.
Thanks in advance!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: help writing simple perl script
by traveler (Parson) on Jul 27, 2006 at 16:39 UTC | |
by ashylarry (Initiate) on Jul 27, 2006 at 20:06 UTC | |
by traveler (Parson) on Jul 27, 2006 at 20:23 UTC | |
by ashylarry (Initiate) on Jul 27, 2006 at 16:50 UTC | |
|
Re: help writing simple perl script
by davido (Cardinal) on Jul 27, 2006 at 16:41 UTC | |
|
Re: help writing simple perl script
by ptum (Priest) on Jul 27, 2006 at 16:27 UTC | |
|
Re: help writing simple perl script
by Ieronim (Friar) on Jul 27, 2006 at 16:53 UTC | |
|
Re: help writing simple perl script
by ambrus (Abbot) on Jul 27, 2006 at 16:14 UTC | |
by ashylarry (Initiate) on Jul 27, 2006 at 16:23 UTC |