#!/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";