http://qs321.pair.com?node_id=430558


in reply to Adding scalars but with a twist..

#!/usr/bin/perl use strict; use warnings; my $Sel1Ttl = 1; my $Sel2Ttl = 2; my $Sel3Ttl = 3; my $result; for ($Sel1Ttl..$Sel3Ttl) { $result += $_; } print "$result\n"; # gives 6

Update:
Sorry, this is just interpolating the variable values and using it for a range, thus it is giving nonsense if there are different values