@derula said:Uhm, are you sure this looks much better? The line starting with sprintf doesn't even have matching brackets... or is that { just a typo? Behold the power of white space.  That mismatched {] "pair" is in the original. That having been said, $ajS->[$_] is used both as a number and as an array reference.  I would like to be unaware of any perl hacks that make that legal in a useful manner.  In any event, when it is used as an array reference, it's given the same index twice.  That also looks like a bug. That leads us to: $Idl{$t} = [ map { sprintf "%.0f", $_ ? ($_[$t] ? $m->[$t] : $_) : undef } map { if (ref $aS->[$_]) { my $ajS_element = $ajS->[$_]; $ajS_element / (1 - ((.08 > 1 / ( ($ajS_element && $ajS_element > 1.5) ? $ajS_element : $D->[$_] )) ? .08 : 1 / ($ajS_element > 2 ? $ajS_element : $D->[$_]) )); } } (0..6) ]; Next, we have some confusion thanks to excessively multi-level inline ifs.  Breaking out the first, and converting the second to a standard if1 gives us: $Idl{$t} = [ map { sprintf "%.0f", $_ ? ($_[$t] ? $m->[$t] : $_) : undef } map { if (ref $aS->[$_]) { my $ajS_element = $ajS->[$_]; my $ajS_element_or_D = ($ajS_element && $ajS_element > 1.5) ? $ajS_element : $D->[$_]; if ($ajS_element_or_D > 12.5) { $ajS_element / .92; } elsif ($ajS_element > 2) { $ajS_element / (1 - 1 / $ajS_element); } else { $ajS_element / (1 - 1 / $D->[$_]); } } } (0..6) ]; That's still a mess, but there's only so much one can do with a single code line.  For example, we can't tell if there might be a $SIG{__WARN__} in effect, which would do something special with that 'undef' if warnings are turned on.  Also, we don't know if $ajS->[$_] evaluates to zero often enough to warrant putting in code to optimize that case.&nbs; (If it is zero, the map element for that iteration is zero). 1 If I recall correctly, the return value of an if clause is not defined in C.  However, it is defined in Perl, to be the value of whichever block is evaluated; if there's no else block and the condition is false, the value is that of the condition (which is false, but since there are multiple false values, the specific condition result may still be useful.)