in reply to Popping Arrays from an Arrays of Arrays
The crux is the line
You create a new array containing on element, the reference to the poped array.@singlefilter = pop(@filter)
The line should read
because you push references to arrays not arrays onto @filter (explicitly by using []) during the push, creating references to anonymous arays), and you couldn't do it any other way, because an array can only hold scalar values; a so called AoA is in reality an Array of Array-references!@singlefilter = @{pop(@filter)}
regards,
tomte
Hlade's Law:
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.
|
|---|