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
In reply to Re: help writing simple perl script
by traveler
in thread help writing simple perl script
by ashylarry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |