my @children = $category->children; my $last_child = pop @children; foreach $child (@children) { handle_not_last_child($child); } handle_last_child($last_child);
In reply to Re: Test for the last element in a foreach
by mvc
in thread Test for the last element in a foreach
by tdevil76
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |