I have code like this:
my @e = ( '($i,$j, $k,$l)', '($i,$k, $j,$l)', '($i,$l, $j,$k)',
'($j,$k, $i,$l)', '($j,$l, $i,$k)', '($k,$l, $i,$j)'
);
#
# Assign various sets of values to $i,$j,$k,$l
#
foreach ( @e ) {
my ($a,$b, $c,$d) = eval $_;
#
# Do calculations based on the values of $a,$b,$c,$d
#
It all works as I intended. But it feels clumsy to use eval like this. I feel there must be a better way of looping over those six permutations of the four values. I've tried various ways, but found nothing that worked, so I fell back on using eval.