#!/usr/bin/perl510 use feature 'switch'; use feature 'say'; { for ( 1..40 ) { my @what; given ( $_ ) { when ( $_ % 3 == 0 ) { push ( @what, 'fizz' ); } when ( $_ % 5 == 0 ) { push ( @what, 'buzz' ); } when ( $_ % 7 == 0 ) { push ( @what, 'sausage' ); } } say join(' ',$_,@what); } }