on-internet
← Community

Tell if `FETCH` called from `@arr` or `$arr[$idx]` or `@arr[@idx]`

Stack Overflow ·

A comment on this other question notes: Nor can FETCH reliably tell if its being called from @array or $array[$idx] or @array[@idxs] Sixteen+ years on, is this still the case? I need to be able to associate/distinguish which subsequent FETCH corresponds with which preceding (if any preceding) FETCHSIZE. E.g., right now I cannot distinguish: scalar(@arr), $arr[0], @arr from @arr, $arr[0], scalar(@arr) as both yield a call sequence of : FETCHSIZE FETCH => 0 FETCHSIZE FETCH => 0

Comments

Sign in or sign up to comment and upvote.

No comments yet.