For the momment this is the more relevant for me xD:
A Perl novice might multiply a list of numbers by three by writing:
my @tripled;
my $count = @numbers;
for (my $i = 0; $i < $count; $i++)
{
$tripled[$i] = $numbers[$i] * 3;
}
A Perl adept might write:
my @tripled;
for my $num (@numbers)
{
push @tripled, $num * 3;
}
An experienced Perl hacker might write:
my @tripled = map { $_ * 3 } @numbers;
Experience writing Perl will help you to focus on what you want to do rather than how to do it.
Another:
push @tripled, $_ * 3 foreach @numbers;