$\="\n"; while (my $x= < 1 2 3 4 >) { # using glob as iterator unless( $x%2 ) { print "$x: chacha" } print "$x: rumba" } print $x;