- or download this
@x = (0, 'one', ' ', 3);
$"=')(';
print "(@x)";
- or download this
my $i = 0;
sub inc { ++$i }
foreach (1..10) { print "$_\n" if(inc == 3 .. inc == 8) }
- or download this
my $animal = 'pig';
foreach $animal ('cat', 'dog', 'horse') {
last if $animal eq 'dog';
}
print "$animal\n";