[Perl]STDIN, while, for, if
http://seungngil.tistory.com/entry/Perlfor-if에서, 입력하는 숫자를 10개가 아닌, 입력이 없어질때까지로 할것. 또한, while문, for문, if문은 각각 하나씩 사용하게된다. use strict;use warnings; my $num;my $result;my @array = (2, 3, 4, 5, 6); for (;;) {print ("Please enter the number.(Enter exit at the end) ");$num = ;chomp $num; if ($num =~ /[a-zA-Z]/ || $num eq "") {exit;} $result = ($num . " = ");my $j = 0;while ($j < scalar(@array)) {$resu..
더보기