hence you need to switch to while and add an iterator method ->each to your API °
while ( my ($widget) = $api->each( $item->{sets}{widgets} ) ) { . +.. }
the iterator will be exhausted as soon as ->each returns an empty list.
Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery
°) like others already suggested
In reply to Re^5: Using lazy list with a for loop
by LanX
in thread Using lazy list with a for loop
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |