six24hourdays
2008-10-21 13:39:05 UTC
Hello,
I would like to know how to test for the last element of a list during
a foreach loop, e.g.
foreach $element (@List) {
if (this is the last element) {
do something
}
}
What would I use for the IF condition?
Thanks,
Dave
I would like to know how to test for the last element of a list during
a foreach loop, e.g.
foreach $element (@List) {
if (this is the last element) {
do something
}
}
What would I use for the IF condition?
Thanks,
Dave
--
To unsubscribe, e-mail: beginners-***@perl.org
For additional commands, e-mail: beginners-***@perl.org
http://learn.perl.org/
To unsubscribe, e-mail: beginners-***@perl.org
For additional commands, e-mail: beginners-***@perl.org
http://learn.perl.org/