fork download
  1. #!/usr/bin/perl
  2.  
  3. X_LOOP:
  4. for my $x (1..3) {
  5. Y_LOOP:
  6. for my $y (4..6) {
  7. Z_LOOP:
  8. for my $z (7..9) {
  9. if ($y == 4) {
  10. next Y_LOOP;
  11. }
  12. if ($z == 7) {
  13. print "$x $y $z go next z loop\n";
  14. next Z_LOOP;
  15. }
  16. if ($z < 9) {
  17. print "$x $y $z go next x loop\n";
  18. next X_LOOP;
  19. }
  20. }
  21. }
  22. }
  23.  
Success #stdin #stdout 0.01s 5300KB
stdin
Standard input is empty
stdout
1 5 7 go next z loop
1 5 8 go next x loop
2 5 7 go next z loop
2 5 8 go next x loop
3 5 7 go next z loop
3 5 8 go next x loop