use strict; use warnings; use feature 'say'; my $s = "2..5"; my ($start, $end) = split /\.\./, $s; say for $start .. $end;