use feature 'say';
use v5.16;
my ($start, $end);
print "Input a number to start the loop with: ";
$start = <STDIN>;
$start == 0 ? $start++ : $start ;
print "Input a number to end the loop with: ";
$end = <STDIN>;
do{
say (($start % 3 == 0) ? (($start % 5 == 0) ? "FizzBuzz" : "Fizz" ) : (($start % 5 == 0) ? "Buzz" : $start));
$start++;
}while $start != $end;
Comments