Of course, it ain't pretty, folks:
In Perl:
my @items = qw(item1 item2); foreach my $item (@items) { take_action($item); }
In PL/SQL:
DECLARE TYPE items_t IS TABLE OF VARCHAR2(80); -- note the strong typing constraint items items_t := items_t('item1', 'item2'); items_index NUMBER := 1; BEGIN <> WHILE items_index IS NOT NULL LOOP DECLARE item VARCHAR2(80) := items(items_index); BEGIN take_action(item); items_index := items.NEXT(items_index); END; END LOOP items_loop; END; /
Note: this version has better syntax.