$x=3; $y=4; $z = 5; # or maybe better ($x, $y, $z) = (3, 4, 5); #### if(match) { do_this(); } else { do_that(); } #### if(match){ do_this(); } else { do_that(); } #### while(){ chomp; next unless /\w/; s/foo/bar/g; say; } while(my $line = ){ chomp $line; next unless $line =~ /\w/; $line =~ s/foo/bar/g; say $line; } #### do_this(), do_that if $match; do_this($_) for @items if $match; #### do_this() unless $found; # surely you're not suggesting this is better, are you? do_this if not $found;