#!/usr/local/bin/perl use strict; use warnings; my @fruits = ("apple", "lemon", "banana"); foreach my $fav(@fruits){ print "$fav\n"; } my @fruits = ("apple", "lemon", "banana"); foreach (@fruits){ print "$_\n"; } my $count = 1; while (1){ print "$count¥n"; $count++; if ($count > 5){ last; } } print "終了¥n"; my $count = 0; while ($count <= 5){ $count++; if ($count == 2){ next; } print "$count¥n"; #next演算子が実行されるとこの位置に進む } print "終了¥n";