programming-examples/perl/Statement/Going onto the Next.pl

11 lines
222 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl
use strict;
use warnings;
my @array = (8, 3, 0, 2, 2, 0);
for (@array) {
if ($_ == 0) {
print "Skipping zero element.\n";
next;
}
print "48 over $_ is ", 48/$_, "\n";
}