in reply to help writing simple perl script
Smaller versions surely exist...use strict; my @arr = <STDIN>; map chomp $_, @arr; foreach my $i (0..$#arr){ foreach my $j (0..$#arr){ print "$arr[$i] $arr[$j]\n" if $i != $j; } }
Update: If you want to read from list.txt use
foo.pl<list.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: help writing simple perl script
by ashylarry (Initiate) on Jul 27, 2006 at 20:06 UTC | |
by traveler (Parson) on Jul 27, 2006 at 20:23 UTC | |
|
Re^2: help writing simple perl script
by ashylarry (Initiate) on Jul 27, 2006 at 16:50 UTC |