#untested, and quite silly eval "print $_ if $i .. $j;";