Woops, the array subscript should have been (i) instead of (l_idx), but I'm sure you got the idea.
$anon_plsql = $dbh -> prepare (q (
DECLARE
l_idx PLS_INTEGER := 0 ;
BEGIN
FOR i IN 1 .. 10 LOOP
:arr (i) := 'Hello ' || i ;
END LOOP ;
END ;
)) ;
@arr = () ;
$anon_plsql -> bind_param (":arr", \@arr) ;
$anon_plsql -> execute ;
