in reply to Test for the last element in a foreach
my $LastSubCat; foreach my $subcat ($category->children) { $LastSubCat = $subcat; # Code to use $subcat } # $LastSubCat now contains the value of the last element
"An undefined problem has an infinite number of solutions." - Robert A. Humphrey "If you're not part of the solution, you're part of the precipitate." - Henry J. Tillman
|
|---|