S
Steve
I'm going through the O'reilly book and I learned about the next
operator. So this works, as it should:
-----------------------------------------
my @words = qw#hello kayak prong#;
for (@words)
{
next if /kayak/;
print "$_\n";
}
-----------------------------------------
However, if I write it as this, it doesn't work:
-----------------------------------------
my @words = qw#hello kayak prong#;
for my $word (@words)
{
next if /kayak/;
print "$word\n";
}
operator. So this works, as it should:
-----------------------------------------
my @words = qw#hello kayak prong#;
for (@words)
{
next if /kayak/;
print "$_\n";
}
-----------------------------------------
However, if I write it as this, it doesn't work:
-----------------------------------------
my @words = qw#hello kayak prong#;
for my $word (@words)
{
next if /kayak/;
print "$word\n";
}